Skip to content

Commit

Permalink
docs: Add docs for new --only option
Browse files Browse the repository at this point in the history
PR-URL: npm#9024
  • Loading branch information
bengl authored and iarna committed Aug 12, 2015
1 parent 3ab1eea commit 4b0a78f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions doc/cli/npm-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,9 @@ shrinkwrap file and use the package.json instead.
The `--nodedir=/path/to/node/source` argument will allow npm to find the
node source code so that npm can compile native modules.

The `--only={prod[uction]|dev[elopment]}` argument will cause either only
`devDependencies` or only non-`devDependencies` to be installed.

See `npm-config(7)`. Many of the configuration params have some
effect on installation, since that's most of what npm does.

Expand Down
12 changes: 12 additions & 0 deletions doc/misc/npm-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,18 @@ Run tests on installation.
A node module to `require()` when npm loads. Useful for programmatic
usage.

### only

* Default: null
* Type: String

When "dev" or "development" and running local `npm install` without any
arguments, only devDependencies (and their dependencies) are installed.

When "prod" or "production" and running local `npm install` without any
arguments, only non-devDependencies (and their dependencies) are
installed.

### optional

* Default: true
Expand Down

0 comments on commit 4b0a78f

Please sign in to comment.