javascript - How can I run multiple NPM scripts in parallel? -


in package.json have these 2 scripts:

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

i have run these 2 scripts in parallel everytime start developing in node.js. first thing thought of adding third script this:

"dev": "npm run start-watch && npm run wp-server" 

... wait start-watch finish before running wp-server.

how can run these in parallel? please keep in mind need see output of these commands. also, if solution involves build tool, i'd rather use gulp instead of grunt because use in project.

use package called concurrently.

npm concurrently --save-dev

then setup npm run dev task so:

"dev": "concurrently --kill-others \"npm run start-watch\" \"npm run wp-server\"" 

Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -

jdbc - Not able to establish database connection in eclipse -