• Home
  • Raw
  • Download

Lines Matching full:npm

2 title: npm-init
10 npm init <package-spec> (same as `npx <package-spec>`)
11 npm init <@scope> (same as `npx <@scope>/create`)
18 `npm init <initializer>` can be used to set up a new or existing npm
21 `initializer` in this case is an npm package named `create-<initializer>`,
22 which will be installed by [`npm-exec`](/commands/npm-exec), and then have its
26 The init command is transformed to a corresponding `npm exec` operation as
29 * `npm init foo` -> `npm exec create-foo`
30 * `npm init @usr/foo` -> `npm exec @usr/create-foo`
31 * `npm init @usr` -> `npm exec @usr/create`
32 * `npm init @usr@2.0.0` -> `npm exec @usr/create@2.0.0`
33 * `npm init @usr/foo@2.0.0` -> `npm exec @usr/create-foo@2.0.0`
35 If the initializer is omitted (by just calling `npm init`), init will fall
44 globally installed, that will be what `npm init` uses. If you want npm
48 * `npm init foo@latest` # fetches and runs the latest `create-foo` from
50 * `npm init foo@1.2.3` # runs `create-foo@1.2.3` specifically
54 Any additional options will be passed directly to the command, so `npm init
55 foo -- --hello` will map to `npm exec -- create-foo --hello`.
58 example showing options passed to both the **npm cli** and a create package,
61 - `npm init foo -y --registry=<url> -- --hello -a`
62 - `npm exec -y --registry=<url> -- create-foo --hello -a`
67 [`create-react-app`](https://npm.im/create-react-app):
70 $ npm init react-app ./my-react-app
74 [`create-esm`](https://npm.im/create-esm):
78 $ npm init esm --yes
84 $ mkdir my-npm-pkg && cd my-npm-pkg
86 $ npm init
92 $ npm init -y
98 `workspace` config option. When using `npm init -w <dir>` the cli will
113 $ npm init -w packages/a
127 The workspaces init also supports the `npm init <initializer> -w <dir>`
131 [`create-react-app`](https://npm.im/create-react-app), the following syntax
136 npm init -w packages/my-react-app react-app .
140 consideration to have in mind is that `npm exec` is going to be run in the
164 The value `npm init` should use by default for the package author's name.
173 The value `npm init` should use by default for the package author's
183 The value `npm init` should use by default for the package license.
189 * Default: "~/.npm-init.js"
192 A module that will be loaded by the `npm init` command. See the
194 [init-package-json](https://github.com/npm/init-package-json) module for
195 more information, or [npm init](/commands/npm-init).
204 The value that `npm init` should use by default for the package version
214 Automatically answer "yes" to any prompts that npm might print on the
227 * Allow clobbering non-npm files in global installs.
228 * Allow the `npm version` command to work on an unclean git repository.
229 * Allow deleting the cache folder with `npm cache clean`.
231 different version of npm.
234 * Allow `npm audit fix` to install modules outside your stated dependency
238 * Implicitly set `--yes` during `npm init`.
239 * Allow clobbering existing values in `npm pkg`
258 npm login --scope=@mycorp --registry=https://registry.mycorp.com
261 npm logout --scope=@mycorp
268 This will also cause `npm init` to create a scoped package.
273 npm init --scope=@foo --yes
294 When set for the `npm init` command, this may be set to the folder of a
323 If set to true, the npm cli will run an update after operations that may
336 all workspaces via the `workspaces` flag, will cause npm to operate only on
343 * [package spec](/using-npm/package-spec)
344 * [init-package-json module](http://npm.im/init-package-json)
345 * [package.json](/configuring-npm/package-json)
346 * [npm version](/commands/npm-version)
347 * [npm scope](/using-npm/scope)
348 * [npm exec](/commands/npm-exec)
349 * [npm workspaces](/using-npm/workspaces)