Skip to content

Commit

Permalink
fix(docs): init usage description corrected (#7759)
Browse files Browse the repository at this point in the history
Updated `npm init <pkg-spec>` command usage documentation for npx
equivalent command format `npx create-<pkg-spec>`
Fixes: #7011
  • Loading branch information
milaninfy committed Aug 28, 2024
1 parent 1772276 commit 7e61151
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/commands/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Init extends BaseCommand {

static name = 'init'
static usage = [
'<package-spec> (same as `npx <package-spec>`)',
'<package-spec> (same as `npx create-<package-spec>`)',
'<@scope> (same as `npx <@scope>/create`)',
]

Expand Down
4 changes: 2 additions & 2 deletions tap-snapshots/test/lib/docs.js.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3231,7 +3231,7 @@ exports[`test/lib/docs.js TAP usage init > must match snapshot 1`] = `
Create a package.json file
Usage:
npm init <package-spec> (same as \`npx <package-spec>\`)
npm init <package-spec> (same as \`npx create-<package-spec>\`)
npm init <@scope> (same as \`npx <@scope>/create\`)
Options:
Expand All @@ -3246,7 +3246,7 @@ aliases: create, innit
Run "npm help init" for more info
\`\`\`bash
npm init <package-spec> (same as \`npx <package-spec>\`)
npm init <package-spec> (same as \`npx create-<package-spec>\`)
npm init <@scope> (same as \`npx <@scope>/create\`)
aliases: create, innit
Expand Down

0 comments on commit 7e61151

Please sign in to comment.