一个用于并行或串行运行多个 npm-scripts 的 CLI 工具。
| index | npm-run-all | run-s | [run-p] | [Node API] |
|---|
一个用于并行或串行运行多个 npm-scripts 的 CLI 工具。
npm run-script 命令无法运行多个脚本,因此如果要运行多个脚本,就会显得有些冗余。让我们通过类似 glob 的模式来缩短它。npm run clean && npm run build:css && npm run build:js && npm run build:htmlnpm-run-all clean build:*& 来并行运行多个命令,但 cmd.exe(npm run-script 默认使用它)不支持 &。Node.js 的用户中有一半在 Windows 上使用它,因此使用 & 可能会阻碍贡献。npm-run-all --parallel 在 Windows 上也能很好地运行。$ npm install npm-run-all --save-dev
# or
$ yarn add npm-run-all --devNode@>=4。这个 npm-run-all 包提供了 3 个 CLI 命令。
主命令是 npm-run-all。 我们可以使用 npm-run-all 命令制定复杂的计划。
run-s 和 [run-p] 都是简写命令。 run-s 用于顺序执行,[run-p] 用于并行执行。 我们可以使用这些命令制定简单的计划。
如果脚本是通过 Yarn 调用的,npm-run-all 会正确地使用 Yarn 来执行计划中的子脚本。
这个 npm-run-all 包提供了 Node API。
欢迎♡
请使用 GitHub Issues。
请使用 GitHub Pull Requests。
我不熟悉英语,因此特别感谢您对文档的修正。
请使用 GitHub Pull Requests。
有一些 npm-scripts 可以帮助开发。
暂无开放 Issues,或尚未同步最近议题。