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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -