mysticatea / npm-run-all

A CLI tool to run multiple npm-scripts in parallel or sequential.
MIT License
5.71k stars 240 forks source link

Glob-like patterns and passing arguments #210

Open ionutt opened 3 years ago

ionutt commented 3 years ago

I have an multibrand app and I am trying to build multiple brands using glob-like patters.

"build": "run-s build:*", "build:brand1": "vue-cli-service build --tenant=brand1", "build:brand2": "vue-cli-service build --tenant=brand2", ... "build:brandn": "vue-cli-service build --tenant=brandn",

But I need to send custom arguments for those "child" scripts like

npm run build --someArgument=true and that argument to be pass in "build:brand1" and "build:brand:2" and ....

How can I achive this?

alvis commented 3 years ago

You can try the argument placeholder {@} e.g.


{
  "build": "run-s \"build:* -- {@}\" --"
}
ionutt commented 1 year ago

This can be close.