【发布时间】:2016-08-18 11:15:15
【问题描述】:
现在我有多个 gulpfile。每次我开始工作时,我都需要运行多个“gulp --gulpfile path/to/another-gulpfile.js”。我可以用一个命令运行它吗?我试过“gulp --gulpfile gulpfile1.js gulpfile2.js gulpfile3.js”,但是没有用。
编辑:
"scripts": {
"gulp": "gulp --gulpfile bin/gulp-tasks/config.js && gulp --gulpfile bin/gulp-tasks/deploy.js"
}
我尝试使用 npm 脚本运行多个 gulp 实例,但看起来只有来自第一个指定 gulpfile 的观察者在工作。简单的 console.logging 显示,第二个 gulpfile 甚至没有启动。它们在单独启动时可以完美运行。
【问题讨论】:
-
为什么要使用多个 gulpfile?
标签: javascript gulp