格式
npm run <command> [--silent] [-- <args>...]
说明
run 是run-script的简写,用于执行配置在package.json中的脚本命令。
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
如果不带命令<command>,则显示可执行命令列表。
D:\antd-vue\2020\antd-demo>npm run
Scripts available in antd-demo via `npm run-script`:
serve
vue-cli-service serve
build
vue-cli-service build
lint
vue-cli-service lint
如果执行了未定义的命令,就会提示 npm ERR! missing script:xxx
D:\antd-vue\2020\antd-demo>npm run dev
npm ERR! missing script: devnpm ERR! A complete log of this run can be found in: