diff options
author | John-David Dalton <john.david.dalton@gmail.com> | 2018-04-19 00:01:24 +0300 |
---|---|---|
committer | Kat Marchán <kzm@zkat.tech> | 2018-04-19 00:01:24 +0300 |
commit | 008a83642e04360e461f56da74b5557d5248a726 (patch) | |
tree | c9d4c873f8c042f21f48cbf27f279c84e5fa03d6 /doc | |
parent | ad7a5962d758efcbcfbd9fda9a3d8b38ddbf89a1 (diff) |
init: use npx for extended initializers (#20303)
PR-URL: https://github.com/npm/npm/pull/20303
Credit: @jdalton
Reviewed-By: @zkat
Diffstat (limited to 'doc')
-rw-r--r-- | doc/cli/npm-init.md | 35 |
1 files changed, 25 insertions, 10 deletions
diff --git a/doc/cli/npm-init.md b/doc/cli/npm-init.md index ec4c25bed..c6d4aaeb4 100644 --- a/doc/cli/npm-init.md +++ b/doc/cli/npm-init.md @@ -3,23 +3,38 @@ npm-init(1) -- Interactively create a package.json file ## SYNOPSIS - npm init [-f|--force|-y|--yes] + npm init [--force|-f|--yes|-y] + npm init <@scope> (same as `npx <@scope>/create`) + npm init [<@scope>/]<pkg> (same as `npx [<@scope>/]create-<pkg>`) ## DESCRIPTION -This will ask you a bunch of questions, and then write a package.json for you. +* `npm init [--force|-f|--yes|-y]`: -It attempts to make reasonable guesses about what you want things to be set to, -and then writes a package.json file with the options you've selected. + This will ask you a bunch of questions, and then write a package.json for + you. -If you already have a package.json file, it'll read that first, and default to -the options in there. + It attempts to make reasonable guesses about what you want things to be set + to, and then writes a package.json file with the options you've selected. -It is strictly additive, so it does not delete options from your package.json -without a really good reason to do so. + If you already have a package.json file, it'll read that first, and default + to the options in there. -If you invoke it with `-f`, `--force`, `-y`, or `--yes`, it will use only -defaults and not prompt you for any options. + It is strictly additive, so it does not delete options from your + package.json without a really good reason to do so. + + If you invoke it with `--force`, `-f`, `--yes`, or `-y`, it will use only + defaults and not prompt you for any options. + +* `npm init <@scope>` (same as `npx <@scope>/create`): + + Run `<@scope>/create` as the package initializer instead of + [`npm-init`](https://www.npmjs.com/package/init-package-json). + +* `npm init [<@scope>/]<pkg>` (same as `npx [<@scope>/]create-<pkg>`): + + Run `[<@scope>/]create-<pkg>` as the package initializer instead of + [`npm-init`](https://www.npmjs.com/package/init-package-json). ## CONFIGURATION |