Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorBryan English <bryan@bryanenglish.com>2015-07-24 19:41:05 +0300
committerRebecca Turner <me@re-becca.org>2015-08-12 09:28:20 +0300
commit4b0a78fc705c28a8d126392e6d482ca8aa6978de (patch)
tree7ac516d4083bea5ac4d9bdb8286c4cebfac643d3 /doc
parent3ab1eea260f0fa61a9c6a444036211f82c97c671 (diff)
docs: Add docs for new --only option
PR-URL: https://github.com/npm/npm/pull/9024
Diffstat (limited to 'doc')
-rw-r--r--doc/cli/npm-install.md3
-rw-r--r--doc/misc/npm-config.md12
2 files changed, 15 insertions, 0 deletions
diff --git a/doc/cli/npm-install.md b/doc/cli/npm-install.md
index 847a64ab0..07c61e174 100644
--- a/doc/cli/npm-install.md
+++ b/doc/cli/npm-install.md
@@ -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.
diff --git a/doc/misc/npm-config.md b/doc/misc/npm-config.md
index e9b532d1d..03a5c8f3b 100644
--- a/doc/misc/npm-config.md
+++ b/doc/misc/npm-config.md
@@ -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