npm与package.json
程序员文章站
2022-03-03 16:57:12
...
更新npm到最新版本
- npm install -g npm
四个npm自带的简写指令
- npm start => npm run start
- npm stop => npm run stop
- npm test => npm run test
- npm restart => npm run stop & npm run restart & npm run start
package.json执行多条指令
通过&&,使package.json执行完前一条指令且不报错时,执行下一条指令
{
"name": "V3",
"version": "0.0.0",
"private": true,
"scripts": {
"start": "cd angular && npm start",
"product": "cd angular && npm run product"
}
}