In my package.json
, I defined two scripts. How do I run them at the same time?
"scripts": {
"server": "webpack-dev-server",
"webpack": "webpack -wd",
},
In my package.json
, I defined two scripts. How do I run them at the same time?
"scripts": {
"server": "webpack-dev-server",
"webpack": "webpack -wd",
},
You can use npm-run-all to combine multiple commands in a lot of different ways
For example, if you had the following scripts in your package.json
:
"scripts": {
"lint": "eslint src",
"build": "babel src -o lib"
}
You could run them in parallel like this:
$ npm-run-all --parallel lint build
See this question for how to run multiple npm commands sequentially