我有package.json
两个
"dependencies": {
"d3": "~3.5.5",
"forever": "^0.14.1"
},
"scripts": {
"install": "make -f install.makefile"
"data": "make -f data.makefile core",
"serve": "node ./node_modules/.bin/forever ./node_modules/.bin/http-server"
}
当我通过运行npm run
检查我的脚本时,我得到:
我想知道“install”是否是保留关键字,因为它没有与其他脚本分组。
在packages.json的脚本对象中,install
是否为具有特殊行为的保留字?
答案 0 :(得分:1)
来自文档:https://docs.npmjs.com/misc/scripts
install,postinstall:安装软件包后运行。
答案 1 :(得分:1)
它不是保留的,而是npm's built-in commands中的一个。
而不是npm run install
,而不是npm install
。