指数
npm-run-all
一个CLI工具,可并行或顺序运行多个npm脚本。
:right_arrow_curving_up_selector: 动机
简化。 官方的npm run-script命令不能运行多个脚本,因此如果我们要运行多个脚本,则有点多余。 让我们通过类似球形的样式来缩短它。 之前: npm run clean && npm run build:css && npm run build:js && npm run build:html 之后: npm-run-all clean build:*
跨平台。 有时我们会使用&并行运行多个命令,但是cmd.exe (默认为npm run-script使用它)不支持& 。 一半的Node.js用户在Windows上使用它,因此使用&可能会阻止贡献。 npm-run-all --parallel在Windows上也很好用。
:optical_disk: 安装
$ npm install npm-run-all --save-dev
# or
$ yarn add npm-run-all --dev
它需要Node@>=
评论0
最新资源