npm-run-all 提供了多种运行多个命令的方式,常用的有以下几个:
--parallel: 并行运行多个命令,例如:npm-run-all --parallel lint build
--serial: 多个命令按排列顺序执行,例如:npm-run-all --serial clean lint build:**
--continue-on-error: 是否忽略错误,添加此参数 npm-run-all 会自动退出出错的命令,继续运行正常的
--race: 添加此参数之后,只要有一个命令运行出错,那么 npm-run-all 就会结束掉全部的命令
https://github.com/mysticatea/npm-run-all/blob/master/docs/npm-run-all.md
网友评论