There is a parent folder (gulp module) which has some child folders (gulp modules too). I want to run the default gulp task of each child through the gulpfile of the parent.
My approach was to iterate through the folders by using gulp-folders
and run a gulp
through gulp-shell
by setting the current work directory to the corresponding child.
var tOptions = {};
[...]
gulp.task('setup-modules', folders('./', function(folder){
tOptions.cwd = folder;
gulp.start('setup-module');
return gulp.src('', {read: false});
}));
gulp.task('setup-module', shell.task([
'gulp'
], tOptions));
It seems that just one instance of the task setup-module
gets started. What do I need to change to get several instances (for each child folder) of the task running?