You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, this is small feature suggestion to enable parallel execution of NPM scripts. I wasn't sure where to document this suggestion, but thought here may a good place.
Search for an existing/duplicate RRFC which might be relevant to your RRFC
Motivation ("The Why")
It's very common to use NPM scripts to run project automation tasks. However when wanting to run multiple tasks in parallel (for example running separate front end and backend processes), this either requires auxiliary CLI libraries (such as concurrently), relying on features of the host operating systems terminal (for example ; delimiters) or running separate terminals for each parallel process.
Enabling such a feature would help shield users from specifics of the host operating system, as well as reduce the necessity for auxiliary concurrent task runners overall. It may also help existing task automation frameworks by allowing each task to be written with a single responsibility, but orchestrated through the NPM script.
Desired Behaviour
The desired functionality would continue to support single shell commands, but if an array of string is supplied, each string would be run as a separate shell process in parallel.
Standard Out/Error emitted from parallel processes would be interleaved on the NPM host process Standard Out/Error respectively (with some future potential to split Standard Out across multiple panes in TTY environments).
Standard In received on the NPM host process may either be disabled for parallel scripts or piped to ALL running parallel processes. Appropriate and default handling Standard In may be a point of discussion for such a feature.
The text was updated successfully, but these errors were encountered:
As @ljharb noted, we already have an existing thread where we've been discussing this type of ability. Would love to consolidate the ideas/discussions there (so closing for now).
Hi, this is small feature suggestion to enable parallel execution of NPM scripts. I wasn't sure where to document this suggestion, but thought here may a good place.
Motivation ("The Why")
It's very common to use NPM scripts to run project automation tasks. However when wanting to run multiple tasks in parallel (for example running separate front end and backend processes), this either requires auxiliary CLI libraries (such as
concurrently
), relying on features of the host operating systems terminal (for example; delimiters
) or running separate terminals for each parallel process.Concurrently example
Proposed Feature
Enabling such a feature would help shield users from specifics of the host operating system, as well as reduce the necessity for auxiliary concurrent task runners overall. It may also help existing task automation frameworks by allowing each task to be written with a single responsibility, but orchestrated through the NPM script.
Desired Behaviour
The desired functionality would continue to support single shell commands, but if an array of
string
is supplied, each string would be run as a separate shell process in parallel.Standard Out/Error emitted from parallel processes would be interleaved on the NPM host process Standard Out/Error respectively (with some future potential to split Standard Out across multiple panes in TTY environments).
Standard In received on the NPM host process may either be disabled for parallel scripts or piped to ALL running parallel processes. Appropriate and default handling Standard In may be a point of discussion for such a feature.
The text was updated successfully, but these errors were encountered: