npm-run-all icon indicating copy to clipboard operation
npm-run-all copied to clipboard

Glob-like patterns and passing arguments

Open ionutt opened this issue 3 years ago • 2 comments

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?

ionutt avatar May 31 '21 15:05 ionutt

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

{
  "build": "run-s \"build:* -- {@}\" --"
}

alvis avatar Aug 10 '21 09:08 alvis

This can be close.

ionutt avatar Sep 08 '23 14:09 ionutt