mrbone / mrbone.github.io

0 stars 0 forks source link

npm script sub task #29

Closed mrbone closed 6 years ago

mrbone commented 6 years ago

build:task1 build:task2

npm run build 时的机制和运行顺序。

mrbone commented 6 years ago

npm-run-all 详解

Sub Tasks

类似 build:task1, build:task2 这种脚本组合,用原生的 npm script 需要使用如下命令:

npm run build:task1 && npm run build:task2

如果使用 npm-run-all:

npm-run-all build:*

并行任务

并行任务可以使用 run-p build:* 或者 npm-run-all --parallel build:*

串行任务

run-s build:* 或者 npm-run-all --serial build:*