-
Notifications
You must be signed in to change notification settings - Fork 247
Description
Motivation ("The Why")
Often an npm script is part of a more complicated pipeline, tools such as grunt + gulp have been created to help manage some of this pipeline. A repo may have multiple steps to a compilation such as clean, build various types of assets (html, css, js), etc. Currently npm itself does not have a mechanism to orchestrate more complex workflow.
Example
Most recently I utilized xargs to accomplish a similar task.
"build": "echo build:clean build:css build:js build:html build:img | xargs -n1 npm run"
if run-series
were available this could be accomplished in a platform agnostic way via
"build": "npm run-series build:clean build:css build:js build:html build:img"
It could also be optimized to run parallel operations
"build": "npm run build:clean && npm run-parallel build:css build:js build:html build:img"
or potentially
"build": "npm run build:clean --then npm run-parallel build:css build:js build:html build:img"
How
Current Behaviour
Currently there is no way to accomplish this beyond using &&
or &
which is can be platform specific
Desired Behaviour
First class support for running multiple scripts in parallel or series
References
- n/a