diff options
author | Kat Marchán <kzm@sykosomatic.org> | 2016-12-18 20:22:09 -0800 |
---|---|---|
committer | Myles Borins <myles.borins@gmail.com> | 2016-12-28 15:30:50 -0500 |
commit | 9946519fba73687d34dccd5813808252a1973f3c (patch) | |
tree | 74d7194d2a00743bcd905027195e7e8000c5ac5a /deps/npm/man/man7/npm-scripts.7 | |
parent | 4d3b487b791606ea965f6280ce0eeea03d79b660 (diff) | |
download | android-node-v8-9946519fba73687d34dccd5813808252a1973f3c.tar.gz android-node-v8-9946519fba73687d34dccd5813808252a1973f3c.tar.bz2 android-node-v8-9946519fba73687d34dccd5813808252a1973f3c.zip |
deps: upgrade npm to 4.0.5
PR-URL: https://github.com/nodejs/node/pull/10330
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Diffstat (limited to 'deps/npm/man/man7/npm-scripts.7')
-rw-r--r-- | deps/npm/man/man7/npm-scripts.7 | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/deps/npm/man/man7/npm-scripts.7 b/deps/npm/man/man7/npm-scripts.7 index 60acb3195e..efcf992f95 100644 --- a/deps/npm/man/man7/npm-scripts.7 +++ b/deps/npm/man/man7/npm-scripts.7 @@ -1,4 +1,4 @@ -.TH "NPM\-SCRIPTS" "7" "November 2016" "" "" +.TH "NPM\-SCRIPTS" "7" "December 2016" "" "" .SH "NAME" \fBnpm-scripts\fR \- How npm handles the "scripts" field .SH DESCRIPTION @@ -9,7 +9,15 @@ following scripts: .IP \(bu 2 prepublish: Run BEFORE the package is published\. (Also run on local \fBnpm -install\fP without any arguments\.) +install\fP without any arguments\. See below\.) +.IP \(bu 2 +prepare: +Run both BEFORE the package is published, and on local \fBnpm +install\fP without any arguments\. (See below\.) This is run +AFTER \fBprepublish\fP, but BEFORE \fBprepublishOnly\fP\|\. +.IP \(bu 2 +prepublishOnly: +Run BEFORE the package is published\. (See below\.) .IP \(bu 2 publish, postpublish: Run AFTER the package is published\. @@ -59,7 +67,28 @@ names will be run for those as well (e\.g\. \fBpremyscript\fP, \fBmyscript\fP, \fBpostmyscript\fP)\. Scripts from dependencies can be run with `npm explore .P <pkg> \-\- npm run <stage>`\. -.SH COMMON USES +.SH PREPUBLISH AND PREPARE +.SS DEPRECATION NOTE +.P +Since \fBnpm@1\.1\.71\fP, the npm CLI has run the \fBprepublish\fP script for both \fBnpm +publish\fP and \fBnpm install\fP, because it's a convenient way to prepare a package +for use (some common use cases are described in the section below)\. It has +also turned out to be, in practice, very +confusing \fIhttps://github\.com/npm/npm/issues/10074\fR\|\. As of \fBnpm@4\.0\.0\fP, a new +event has been introduced, \fBprepare\fP, that preserves this existing behavior\. A +\fInew\fR event, \fBprepublishOnly\fP has been added as a transitional strategy to +allow users to avoid the confusing behavior of existing npm versions and only +run on \fBnpm publish\fP (for instance, running the tests one last time to ensure +they're in good shape)\. +.P +\fBIMPORTANT:\fR As of \fBnpm@5\fP, \fBprepublish\fP will \fIonly\fR be run for \fBnpm +publish\fP\|\. This will make its behavior identical to \fBprepublishOnly\fP, so +\fBnpm@6\fP or later may drop support for the use of \fBprepublishOnly\fP, and then +maybe we can all forget this embarrassing thing ever happened\. +.P +See https://github\.com/npm/npm/issues/10074 for a much lengthier +justification, with further reading, for this change\. +.SS USE CASES .P If you need to perform operations on your package before it is used, in a way that is not dependent on the operating system or architecture of the |