参考链接:

lifecycle

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
"scripts": {
"prepublish": "",
"prepare": "",
"prepublishOnly": "",
"prepack":"",
"postpack":"",
"publish":"",
"preinstall":"",
"install":" install的默认值为 'node-gyp rebuild' ",
"postinstall":"",
"preuninstall":"",
"uninstall":"",
"postuninstall":"",
"preversion":"",
"version":"",
"postversion":"",
"pretest":"",
"test":"",
"posttest":"",
"prestop":"",
"stop":"",
"poststop":"",
"prestart":"",
"start":"默认值为 'node server.js' ",
"poststart":"",
"prerestart,prestart,postprestart":"",
"preshrinkwrap,shrinkwrap,postshrinkwrap":""
}