node/deps/npm/docs/content/cli-commands/npm-restart.md
Myles Borins 4a3ccd8938
deps: update npm to 6.14.3
PR-URL: https://github.com/nodejs/node/pull/32368
Refs: https://github.com/nodejs/node/issues/32296
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2020-03-19 16:40:58 -04:00

49 lines
942 B
Markdown

---
section: cli-commands
title: npm-restart
description: Restart a package
---
# npm-restart(1)
## Restart a package
### Synopsis
```bash
npm restart [-- <args>]
```
### Description
This restarts a package.
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
### 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
* [npm run-script](/cli-commands/run-script)
* [npm scripts](/using-npm/scripts)
* [npm test](/cli-commands/test)
* [npm start](/cli-commands/start)
* [npm stop](/cli-commands/stop)
* [npm restart](/cli-commands/restart)