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
It'd be nice if parallelshell has a shortcut for running npm scripts, something like:
parallelshell 'npm run build'# old style
parallelshell -n 'build'# shorthand style
We could also use globbing here, to expand multiple npm scripts; for example:
parallelshell 'npm run build:js''npm run build:css''npm run build:html'# old style
parallelshell -n 'build:js' -n 'build:css' -n 'build:html'# new shorthand style
parallelshell -n 'build:*'# new shorthand style with globs
Of course, each string would have the -n flag so they could be mixed and matched:
parallelshell 'npm run build:js''echo normal command''npm run build:html'# old style
parallelshell -n 'build:js''echo normal command' -n 'build:html'# new shorthand style
The text was updated successfully, but these errors were encountered:
I like it
Argument parsing would need a rewrite and we would need something to
translate the globbing.. Npm has no API for it, does it? So simple
project.json grep?
Grepping the project.json would be the most straightforward. I think we only (realistically) need to support foo* or *foo - in other words a search by prefixes or suffixes. We could trivially implement this by parsing the package.json in the cwd, calculating if the glob is a prefix or suffix glob, iterating over keys and match using indexOf().
For argument parsing, I'd recommend we use minimist, as it is trivial to use and can pass multiple flags as an array of values, e.g.:
It'd be nice if parallelshell has a shortcut for running npm scripts, something like:
We could also use globbing here, to expand multiple npm scripts; for example:
Of course, each string would have the
-n
flag so they could be mixed and matched:The text was updated successfully, but these errors were encountered: