Is it possible to use gulp with git sub-modules that have their own gulp settings and npm modules?
This is the idea:
/ Project
|- Modules
|-- Grid
|--- some files and subfolders
|--- gulpfile.js
|-- Typography
|--- some files and subfolders
|--- gulpfile.js
|
| gulpfile.js
Modules are folder where I would like to keep unknown number of git sub-modules. Each of those git sub-modules would have their own gulpfile.js and NPM modules.
Question is - When I start gulp process from the root folder, is it possible for main gulpfile.js to start all other gulpfile.js files from included git sub-modules?
There's
gulp-hubwhich let's you run gulpfiles in subfolders. When you rungulp fooin your root folder it will run thefootask for each submodule.Since you need to pass it an array with the location of each submodule's gulpfile it's easiest to use the
globpackage in order to automatically find what submodules there are and which of them have gulpfiles (instead of hardcoding all of that).This is what your Project/gulpfile.js would look like:
Now when you run
gulpin your root folder it will run thedefaulttask for each submodule: