I have 2 npm scripts: tsc -w and jest --watch that I want to execute concurrently. I know there is a tool called concurrently that could be used for this.
"test:watch": "concurrently -P --kill-others \"npm run watch\" \"jest --watchAll -- {@} \"",
Problem is I want to pass a param to the Jest command, and not to the concurrently command.
How to pass an argument to the 2nd command when using concurrently with npm?
Use the pass-through flag to pass arguments from your command line to the script.
Use it like this:
You need to use
--twice to reach the inner Jest script!