yarn exec
execute a shell script
yarn exec <commandName> ...
Examples
Section titled “Examples”Execute a single shell command :
yarn exec echo Hello World
Execute a shell script :
yarn exec "tsc & babel src --out-dir lib"
Details
Section titled “Details”This command simply executes a shell script within the context of the root directory of the active workspace using the portable shell.
It also makes sure to call it in a way that’s compatible with the current project (for example, on PnP projects the environment will be setup in such a way that PnP will be correctly injected into the environment).