vue-demo 中的 package.json 中 scripts
"scripts": { "serve": "vue-cli-service serve", "build": "vue-cli-service build", "start": "npm run serve" },
node-serve 的 package.json 中 scripts
"scripts": { "start": "node server.js", "server": "nodemon server.js" },
外层的package.json
{ "name": "study-vue-demo", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo "Error: no test specified" && exit 1", "vue-demo-install": "npm install --prefix vue-demo", "vue-demo": "npm start --prefix vue-demo", "node-server-install": "npm install --prefix node-server", "node-server": "npm run server --prefix node-server", "dev": "concurrently "npm run node-server" "npm run vue-demo"" }, "author": "", "license": "ISC", "dependencies": { "concurrently": "^5.2.0" } }