Last active
March 25, 2016 19:18
-
-
Save joewright/b2bfccb0ad0a6d9335a0 to your computer and use it in GitHub Desktop.
programmatic gulp task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gulp.task('programmatic-configs', function () { | |
var foldernames = ['some', 'folder', 'names']; | |
var tasks = foldernames.map(function (fname) { | |
var taskname = fname + '-build'; | |
gulp.task(taskname, function (done) { | |
SOME_CONFIG_NAME = fname; | |
//sequence will run with alternate config... | |
runSequence('build', done); | |
}); | |
return taskname; | |
}); | |
runSequence.apply({}, tasks); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment