现在我有多个gulpfiles。每次我去工作的时候,我都需要运行多个"gulp --gulpfile path/ to /另一个-gupfile.js“。我能用一条命令运行它吗?我试过"gulp -gulpfile gupfile1.js gupfile2.js gupfile3.js“,但它不起作用。
编辑:
"scripts": {
"gulp": "gulp --gulpfile bin/gulp-tasks/config.js && gulp --gulpfile bin/gulp-tasks/deploy.js"
}我尝试使用npm脚本运行多个gulp实例,但看起来只有第一个指定的gulp文件中的监视器在工作。简单console.logging显示,第二个even文件甚至都没有启动。当它们单独启动时,它们确实可以完美地工作。
发布于 2016-04-25 15:23:33
您可以尝试将您的gulp命令放在npm package.json中
scripts: {
gulp: gulp --gulpfile path/to/gulpfile1.js && gulp --gulpfile path/to/gulpfile2.js
}然后你可以运行一个命令npm run gulp;
另一种方式是,你可以参考这篇文章了解更多细节http://macr.ae/article/splitting-gulpfile-multiple-files.html
https://stackoverflow.com/questions/36834217
复制相似问题