Answers for "npm run two commands parallely"

1

npm parallel run

// The tool is written in Node.js, but you can use it to run any commands.
npm install -g concurrently

// or if you are using it from npm scripts:
npm install concurrently --save

// Remember to surround separate commands with quotes:
concurrently "yarn run script1"   "yarn run script2"   "yarn run script3"

// In package.json, escape quotes:
"start": "concurrently "command1 arg" "command2 arg""
Posted by: Guest on December-03-2020
0

how to run multiple npm scripts parallel

If you're using an UNIX-like environment, just use & as the separator:

"dev": "npm run start-watch & npm run wp-server"
Otherwise if you're interested on a cross-platform solution, you could use npm-run-all module:

"dev": "npm-run-all --parallel start-watch wp-server"
Posted by: Guest on June-15-2021

Browse Popular Code Answers by Language