mirror of
https://github.com/pnpm/pnpm.git
synced 2026-01-27 16:28:59 -05:00
feat(help): link to the versioned docs
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import pnpmManifest from '@pnpm/cli-meta'
|
||||
import getConfig from './getConfig'
|
||||
|
||||
export { getConfig }
|
||||
@@ -8,4 +9,7 @@ export * from './readProjectManifest'
|
||||
export * from './recursiveSummary'
|
||||
export * from './style'
|
||||
|
||||
export const docsUrl = (cmd: string) => `https://pnpm.js.org/cli/${cmd}`
|
||||
export const docsUrl = (cmd: string) => {
|
||||
const [pnpmMajorVersion] = pnpmManifest.version.split('.')
|
||||
return `https://pnpm.js.org/${pnpmMajorVersion}.x/cli/${cmd}`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user