diff options
author | Jussi Kalliokoski <jussi.kalliokoski@gmail.com> | 2015-02-19 11:50:36 +0300 |
---|---|---|
committer | Forrest L Norvell <forrest@npmjs.com> | 2015-02-27 11:24:56 +0300 |
commit | f33e8b8ff2de094071c5976be95e35110cf2ab1a (patch) | |
tree | 3db5f59a06dbdfb84e768a6d4e84a589813e4992 /doc | |
parent | 448efd0eaa6f97af0889bf47efc543a1ea2f8d7e (diff) |
Added an --if-present flag for not erroring on unspecified scripts.
Fixes #7354.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/misc/npm-config.md | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/doc/misc/npm-config.md b/doc/misc/npm-config.md index 7e4c10af2..e727e1666 100644 --- a/doc/misc/npm-config.md +++ b/doc/misc/npm-config.md @@ -243,7 +243,7 @@ If true, then only prints color codes for tty file descriptors. * Default: Infinity * Type: Number -The depth to go when recursing directories for `npm ls`, +The depth to go when recursing directories for `npm ls`, `npm cache ls`, and `npm outdated`. For `npm outdated`, a setting of `Infinity` will be treated as `0` @@ -390,6 +390,17 @@ A proxy to use for outgoing https requests. If the `HTTPS_PROXY` or `https_proxy` or `HTTP_PROXY` or `http_proxy` environment variables are set, proxy settings will be honored by the underlying `request` library. +### if-present + +* Default: false +* Type: Boolean + +If true, npm will not exit with an error code when `run-script` is invoked for +a script that isn't defined in the `scripts` section of `package.json`. This +option can be used when it's desirable to optionally run a script when it's +present and fail if the script fails. This is useful, for example, when running +scripts that may only apply for some builds in an otherwise generic CI setup. + ### ignore-scripts * Default: false |