npm-run-all
npm-run-all copied to clipboard
Ability to exclude a particular task
It'd be nice for run-s
etc. to be able to exclude a particular script via argument in the case of temporarily needing to suppress something.
e.g.
run-s test:* --except test:foo
It uses minimatch
under the hood, so you can already use negated patterns.
In your case:
run-s test:!(foo)
Demo:
❯ run-s 'wow:*'
> @ wow:a
> echo a
a
> @ wow:b
> echo b
b
> @ wow:c
> echo c
c
❯ run-s 'wow:!(c)'
> @ wow:a
> echo a
a
> @ wow:b
> echo b
b
You can even exclude multiple:
❯ run-s 'wow:!(b|c)'
> @ wow:a
> echo a
a
@fregante this doesn't work as expected. When you e.g. try to exclude "b" in a series of a, b, c. It also doesn't execute "c".