How to handle args in yarn CLI that calls multiple scripts

Viewed 240

Let's say I have a yarn script that's set up like this:

// package.json
{
  ...
  "scripts": {
    "custom": "script1 && script2"
  }
}

If script1 requires some additional arguments, how would I pass them?

Running yarn custom -- --foo=bar would trigger script1 && script2 --foo=bar as opposed to the intended script1 --foo=bar && script2.

0 Answers
Related