Reputation: 17
Right now I have multiple gulpfiles. Everytime I get to work I need to run mulptiple "gulp --gulpfile path/to/another-gulpfile.js". Can I run it with one command? I tried "gulp --gulpfile gulpfile1.js gulpfile2.js gulpfile3.js", but it didn't work.
EDIT:
"scripts": {
"gulp": "gulp --gulpfile bin/gulp-tasks/config.js && gulp --gulpfile bin/gulp-tasks/deploy.js"
}
I tried running multiple gulp instances using npm scripts, but it looks like only watchers from first specified gulpfile are working. Simple console.logging showed, that second gulpfile was not even started. They do work perfectly when launched separately.
Upvotes: 0
Views: 164
Reputation: 4010
one way you can try put your gulp command in npm package.json
scripts: {
gulp: gulp --gulpfile path/to/gulpfile1.js && gulp --gulpfile path/to/gulpfile2.js
}
then you can run one command npm run gulp
;
the other way you can refer to this post for more details http://macr.ae/article/splitting-gulpfile-multiple-files.html
Upvotes: 1