1NPM-RESTART(1) NPM-RESTART(1)
2
3
4
6 npm-restart - Restart a package
7
8 Synopsis
9 npm restart [-- <args>]
10
11 Description
12 This restarts a project. It is equivalent to running npm run-script
13 restart.
14
15 If the current project has a "restart" script specified in pack‐
16 age.json, then the following scripts will be run:
17
18 1. prerestart
19
20 2. restart
21
22 3. postrestart
23
24
25 If it does not have a "restart" script specified, but it does have stop
26 and/or start scripts, then the following scripts will be run:
27
28 1. prerestart
29
30 2. prestop
31
32 3. stop
33
34 4. poststop
35
36 5. prestart
37
38 6. start
39
40 7. poststart
41
42 8. postrestart
43
44
45 Configuration
46 <!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> <!-- automatically
47 generated, do not edit manually --> <!-- see lib/utils/config/defini‐
48 tions.js -->
49
50 ignore-scripts
51 • Default: false
52
53 • Type: Boolean
54
55
56 If true, npm does not run scripts specified in package.json files.
57
58 Note that commands explicitly intended to run a particular script, such
59 as npm start, npm stop, npm restart, npm test, and npm run-script will
60 still run their intended script if ignore-scripts is set, but they will
61 not run any pre- or post-scripts. <!-- automatically generated, do not
62 edit manually --> <!-- see lib/utils/config/definitions.js -->
63
64
65 script-shell
66 • Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows
67
68 • Type: null or String
69
70
71 The shell to use for scripts run with the npm exec, npm run and npm
72 init <pkg> commands. <!-- automatically generated, do not edit manu‐
73 ally --> <!-- see lib/utils/config/definitions.js -->
74
75 <!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
76
77
78 See Also
79 • npm help run-script
80
81 • npm help scripts
82
83 • npm help test
84
85 • npm help start
86
87 • npm help stop
88
89 • npm help restart
90
91
92
93
94 January 2022 NPM-RESTART(1)