Open Webbrother opened 7 years ago
Thank you for the question.
At first, npm-run-all script-one script-two
and script-one & script-two
is pretty different. The npm-run-all script-one script-two
is equivalence to npm run script-one && npm run script-two
. In short, npm-run-all
is a tool to run multiple npm-scripts. In addition;
npm-run-all build:**
. This allow you to simplify npm-scripts.npm-run-all -p watch:js watch:css
. This is almost equivalence to npm run watch:js & npm run watch:css
, but works on Windows which doesn't support the &
operator, as well.--race
option is useful for tests. E.g. npm-run-all -p -r test-server test
runs the test server and test in parallel, then it will kill the test-server automatically after the test completed.Documents is here: https://github.com/mysticatea/npm-run-all/blob/master/docs/npm-run-all.md
I'm not sure if understand of difference between:
Can anybody explain? What is the difference? Why I should use npm-run-all?