diff --git a/docs/lib/content/using-npm/config.md b/docs/lib/content/using-npm/config.md index c1e117a807e31..252bbcf3a27e2 100644 --- a/docs/lib/content/using-npm/config.md +++ b/docs/lib/content/using-npm/config.md @@ -20,6 +20,14 @@ Using `--flag` without specifying any value will set the value to `true`. Example: `--flag1 --flag2` will set both configuration parameters to `true`, while `--flag1 --flag2 bar` will set `flag1` to `true`, and `flag2` to `bar`. Finally, `--flag1 --flag2 -- bar` will set both configuration parameters to `true`, and the `bar` is taken as a command argument. +**Common examples:** + +* `npm install --prefix /path/to/dir` - Runs npm commands in a different directory without changing the current working directory +* `npm install --global` - Installs packages globally (shorthand: `-g`) +* `npm install --save-dev` - Saves to devDependencies (shorthand: `-D`) + +Any configuration option documented in the [Config Settings](#config-settings) section below can be set via command line flags using `--option-name value` syntax. + #### Environment Variables Any environment variables that start with `npm_config_` will be interpreted as a configuration parameter.