Skip to content

Commit 9968be4

Browse files
committed
docs: add init-specific params to init docs/help
Closes npm/init-package-json#21
1 parent 8088325 commit 9968be4

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

lib/commands/init.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ const BaseCommand = require('../base-command.js')
1616
class Init extends BaseCommand {
1717
static description = 'Create a package.json file'
1818
static params = [
19+
'init-author-name',
20+
'init-author-url',
21+
'init-license',
22+
'init-module',
23+
'init-version',
1924
'yes',
2025
'force',
2126
'scope',

tap-snapshots/test/lib/commands/publish.js.test.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,7 @@ exports[`test/lib/commands/publish.js TAP re-loads publishConfig.registry if add
315315
`
316316

317317
exports[`test/lib/commands/publish.js TAP respects publishConfig.registry, runs appropriate scripts > new package version 1`] = `
318+
318319
`
319320

320321
exports[`test/lib/commands/publish.js TAP restricted access > must match snapshot 1`] = `

tap-snapshots/test/lib/docs.js.test.cjs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3160,7 +3160,9 @@ npm init <package-spec> (same as \`npx <package-spec>\`)
31603160
npm init <@scope> (same as \`npx <@scope>/create\`)
31613161
31623162
Options:
3163-
[-y|--yes] [-f|--force] [--scope <@scope>]
3163+
[--init-author-name <init-author-name>] [--init-author-url <init-author-url>]
3164+
[--init-license <init-license>] [--init-module <init-module>]
3165+
[--init-version <init-version>] [-y|--yes] [-f|--force] [--scope <@scope>]
31643166
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
31653167
[-ws|--workspaces] [--no-workspaces-update] [--include-workspace-root]
31663168
@@ -3175,6 +3177,11 @@ npm init <@scope> (same as \`npx <@scope>/create\`)
31753177
aliases: create, innit
31763178
\`\`\`
31773179
3180+
#### \`init-author-name\`
3181+
#### \`init-author-url\`
3182+
#### \`init-license\`
3183+
#### \`init-module\`
3184+
#### \`init-version\`
31783185
#### \`yes\`
31793186
#### \`force\`
31803187
#### \`scope\`

0 commit comments

Comments
 (0)