安装
npm install concurrently -D
命令参数
$ concurrently "command1 arg" "command2 arg"
使用示例: webpack + php前后端混合开发
package.json
{ "scripts": { "dev:client": "cross-env NODE_ENV=development webpack serve --config webpack.dev.js", "dev:server": "php think run", "dev": "concurrently \"npm run dev:client\" \"npm run dev:server\"" }}
同时启动前端开发环境和后端开发环境
$ npm run dev