]> gerrit.simantics Code Review - simantics/district.git/blob - org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/man/man1/npm-run-script.1
Adding integrated tile server
[simantics/district.git] / org.simantics.maps.server / node / node-v4.8.0-win-x64 / node_modules / npm / man / man1 / npm-run-script.1
1 .TH "NPM\-RUN\-SCRIPT" "1" "October 2016" "" ""
2 .SH "NAME"
3 \fBnpm-run-script\fR \- Run arbitrary package scripts
4 .SH SYNOPSIS
5 .P
6 .RS 2
7 .nf
8 npm run\-script [command] [\-\- <args>]
9 npm run [command] [\-\- <args>]
10 .fi
11 .RE
12 .SH DESCRIPTION
13 .P
14 This runs an arbitrary command from a package's \fB"scripts"\fP object\.  If no
15 \fB"command"\fP is provided, it will list the available scripts\.  \fBrun[\-script]\fP is
16 used by the test, start, restart, and stop commands, but can be called
17 directly, as well\. When the scripts in the package are printed out, they're
18 separated into lifecycle (test, start, restart) and directly\-run scripts\.
19 .P
20 As of \fBnpm@2\.0\.0\fP \fIhttp://blog\.npmjs\.org/post/98131109725/npm\-2\-0\-0\fR, you can
21 use custom arguments when executing scripts\. The special option \fB\-\-\fP is used by
22 getopt \fIhttp://goo\.gl/KxMmtG\fR to delimit the end of the options\. npm will pass
23 all the arguments after the \fB\-\-\fP directly to your script:
24 .P
25 .RS 2
26 .nf
27 npm run test \-\- \-\-grep="pattern"
28 .fi
29 .RE
30 .P
31 The arguments will only be passed to the script specified after \fBnpm run\fP
32 and not to any pre or post script\.
33 .P
34 The \fBenv\fP script is a special built\-in command that can be used to list
35 environment variables that will be available to the script at runtime\. If an
36 "env" command is defined in your package it will take precedence over the
37 built\-in\.
38 .P
39 In addition to the shell's pre\-existing \fBPATH\fP, \fBnpm run\fP adds
40 \fBnode_modules/\.bin\fP to the \fBPATH\fP provided to scripts\. Any binaries provided by
41 locally\-installed dependencies can be used without the \fBnode_modules/\.bin\fP
42 prefix\. For example, if there is a \fBdevDependency\fP on \fBtap\fP in your package,
43 you should write:
44 .P
45 .RS 2
46 .nf
47 "scripts": {"test": "tap test/\\*\.js"}
48 .fi
49 .RE
50 .P
51 instead of \fB"scripts": {"test": "node_modules/\.bin/tap test/\\*\.js"}\fP to run your tests\.
52 .SH SEE ALSO
53 .RS 0
54 .IP \(bu 2
55 npm help 7 scripts
56 .IP \(bu 2
57 npm help test
58 .IP \(bu 2
59 npm help start
60 .IP \(bu 2
61 npm help restart
62 .IP \(bu 2
63 npm help stop
64
65 .RE
66