@@ -32,7 +32,7 @@ npm run test -- --grep="pattern"
3232```
3333
3434The arguments will only be passed to the script specified after ``` npm run ```
35- and not to any pre or post script.
35+ and not to any ` pre ` or ` post ` script.
3636
3737The ` env ` script is a special built-in command that can be used to list
3838environment variables that will be available to the script at runtime. If an
@@ -56,7 +56,8 @@ instead of
5656```
5757
5858The actual shell your script is run within is platform dependent. By default,
59- on Unix-like systems it is the ` /bin/sh ` command, on Windows it is the ` cmd.exe ` .
59+ on Unix-like systems it is the ` /bin/sh ` command, on Windows it is
60+ ` cmd.exe ` .
6061The actual shell referred to by ` /bin/sh ` also depends on the system.
6162You can customize the shell with the ` script-shell ` configuration.
6263
@@ -73,15 +74,43 @@ If `--scripts-prepend-node-path=auto` is passed (which has been the default
7374in ` npm ` v3), this is only performed when that ` node ` executable is not
7475found in the ` PATH ` .
7576
76- If you try to run a script without having a ` node_modules ` directory and it fails,
77- you will be given a warning to run ` npm install ` , just in case you've forgotten.
77+ If you try to run a script without having a ` node_modules ` directory and it
78+ fails, you will be given a warning to run ` npm install ` , just in case you've
79+ forgotten.
7880
79- You can use the ` --silent ` flag to prevent showing ` npm ERR! ` output on error.
81+ ### Configuration
82+
83+ #### if-present
84+
85+ * Type: Boolean
86+ * Default: false
8087
8188You can use the ` --if-present ` flag to avoid exiting with a non-zero exit code
8289when the script is undefined. This lets you run potentially undefined scripts
8390without breaking the execution chain.
8491
92+ #### ignore-scripts
93+
94+ * Type: Boolean
95+ * Default: false
96+
97+ Skips running ` pre ` and ` post ` scripts.
98+
99+ #### script-shell
100+
101+ * Type: String
102+ * Default: ` null `
103+
104+ Optional custom script to use to execute the command. If not defined defaults
105+ to ` /bin/sh ` on Unix, defaults to ` env.comspec ` or ` cmd.exe ` on Windows.
106+
107+ #### silent
108+
109+ * Type: Boolean
110+ * Default: false
111+
112+ You can use the ` --silent ` flag to prevent showing ` npm ERR! ` output on error.
113+
85114### See Also
86115
87116* [ npm scripts] ( /using-npm/scripts )
0 commit comments