Gulp extension to run tasks from multiple gulpfiles.
Install gulp-hub:$ npm install gulp-hub
Create a gulpfile.js which looks like this:var gulp = ;var HubRegistry = ;/* load some gulpfiles into the registry */var hub = './project1/gulpfile.js' './project1/gulpfile.js';/* tell gulp to use the tasks just loaded */gulp;
Gulp will execute [taskname] in all of the gulpfiles.
HubRegistry constructor accepts glob patterns. Tasks registered in the same gulpfile from which gulp-hub is called will be included. If one of the child gulpfiles also uses HubRegistry then that is handled too.
Use gulp --tasks to view the task tree:
gulp --tasksgulp-hub/examples$ gulp --tasks[15:56:21] Loading /Users/frank/work/gulp-hub/examples/project1/gulpfile.js[15:56:21] Loading /Users/frank/work/gulp-hub/examples/project1/project1A/gulpfile.js[15:56:21] Loading /Users/frank/work/gulp-hub/examples/project1/project1B/gulpfile.js[15:56:21] Loading /Users/frank/work/gulp-hub/examples/project2/gulpfile.js[15:56:21] Tasks
See the example project for more advanced examples.