Parallel npm scripts
My preferred task runner these days when dealing with JavaScript projects is using npm scripts. However, getting them to run in parallel is a bit tricky since I tend to use both Linux and Windows.
With a package called npm-run-all, the setup is trivial:
The above will run all of our watch
tasks concurrently. If we need to run some
tasks in sequence first, we can do this:
The only downside seems to be that some programs may lose their colors if you
don’t set it explicitly (with --colors
, for example). I can’t say that I’m
particularly bothered by that though.