summaryrefslogtreecommitdiff
path: root/deps/npm/doc/api/npm-restart.md
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/doc/api/npm-restart.md')
-rw-r--r--deps/npm/doc/api/npm-restart.md33
1 files changed, 26 insertions, 7 deletions
diff --git a/deps/npm/doc/api/npm-restart.md b/deps/npm/doc/api/npm-restart.md
index c40704438e..606c41bf85 100644
--- a/deps/npm/doc/api/npm-restart.md
+++ b/deps/npm/doc/api/npm-restart.md
@@ -1,5 +1,5 @@
-npm-restart(3) -- Start a package
-=================================
+npm-restart(3) -- Restart a package
+===================================
## SYNOPSIS
@@ -7,14 +7,33 @@ npm-restart(3) -- Start a package
## DESCRIPTION
-This runs a package's "restart" script, if one was provided.
-Otherwise it runs package's "stop" script, if one was provided, and then
-the "start" script.
+This restarts a package (or multiple packages).
+
+This runs a package's "stop", "restart", and "start" scripts, and associated
+pre- and post- scripts, in the order given below:
+
+1. prerestart
+2. prestop
+3. stop
+4. poststop
+5. restart
+6. prestart
+7. start
+8. poststart
+9. postrestart
If no version is specified, then it restarts the "active" version.
-npm can run tests on multiple packages. Just specify multiple packages
-in the `packages` parameter.
+npm can restart multiple packages. Just specify multiple packages in
+the `packages` parameter.
+
+## NOTE
+
+Note that the "restart" script is run **in addition to** the "stop"
+and "start" scripts, not instead of them.
+
+This is the behavior as of `npm` major version 2. A change in this
+behavior will be accompanied by an increase in major version number
## SEE ALSO