]> gerrit.simantics Code Review - simantics/district.git/blob - org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/doc/cli/npm-run-script.md
Adding integrated tile server
[simantics/district.git] / org.simantics.maps.server / node / node-v4.8.0-win-x64 / node_modules / npm / doc / cli / npm-run-script.md
1 npm-run-script(1) -- Run arbitrary package scripts
2 ==================================================
3
4 ## SYNOPSIS
5
6     npm run-script [command] [-- <args>]
7     npm run [command] [-- <args>]
8
9 ## DESCRIPTION
10
11 This runs an arbitrary command from a package's `"scripts"` object.  If no
12 `"command"` is provided, it will list the available scripts.  `run[-script]` is
13 used by the test, start, restart, and stop commands, but can be called
14 directly, as well. When the scripts in the package are printed out, they're
15 separated into lifecycle (test, start, restart) and directly-run scripts.
16
17 As of [`npm@2.0.0`](http://blog.npmjs.org/post/98131109725/npm-2-0-0), you can
18 use custom arguments when executing scripts. The special option `--` is used by
19 [getopt](http://goo.gl/KxMmtG) to delimit the end of the options. npm will pass
20 all the arguments after the `--` directly to your script:
21
22     npm run test -- --grep="pattern"
23
24 The arguments will only be passed to the script specified after ```npm run```
25 and not to any pre or post script.
26
27 The `env` script is a special built-in command that can be used to list
28 environment variables that will be available to the script at runtime. If an
29 "env" command is defined in your package it will take precedence over the
30 built-in.
31
32 In addition to the shell's pre-existing `PATH`, `npm run` adds
33 `node_modules/.bin` to the `PATH` provided to scripts. Any binaries provided by
34 locally-installed dependencies can be used without the `node_modules/.bin`
35 prefix. For example, if there is a `devDependency` on `tap` in your package,
36 you should write:
37
38     "scripts": {"test": "tap test/\*.js"}
39
40 instead of `"scripts": {"test": "node_modules/.bin/tap test/\*.js"}` to run your tests.
41
42 ## SEE ALSO
43
44 * npm-scripts(7)
45 * npm-test(1)
46 * npm-start(1)
47 * npm-restart(1)
48 * npm-stop(1)