How can I run multiple npm scripts in parallel?

后端 未结 22 2497
灰色年华
灰色年华 2020-11-22 05:48

In my package.json I have these two scripts:

  \"scripts\": {
    \"start-watch\": \"nodemon run-babel index.js\",
    \"wp-server\": \"webpack-         


        
22条回答
  •  梦如初夏
    2020-11-22 06:12

    npm install npm-run-all --save-dev
    

    package.json:

    "scripts": {
      "start-watch": "...",
      "wp-server": "...",
      "dev": "npm-run-all --parallel start-watch wp-server"
    }
    

    More info: https://github.com/mysticatea/npm-run-all/blob/master/docs/npm-run-all.md

提交回复
热议问题