我有两个npm脚本:tsc -w和jest --watch,我想同时执行它们。我知道有一个叫做concurrently的工具可以用来做这个。
"test:watch": "concurrently -P --kill-others \"npm run watch\" \"jest --watchAll -- {@} \"",问题是,我想将param传递给Jest命令,而不是传递给concurrently命令。
如何在使用concurrently和npm时将参数传递给第二个命令
发布于 2022-07-10 12:06:37
使用传递标志将参数从命令行传递到脚本。
"test:watch": "concurrently -P --kill-others \"npm run watch\" \"jest --watchAll -- {@} \"",像这样使用它:
npm run test:watch -- -- cookie您需要使用--两次才能到达内部Jest脚本!
https://stackoverflow.com/questions/72928355
复制相似问题