I'd like to loop through an object and pass an array of file paths to gulp.src on each iteration and then do some processing on those files. The code below is for illustration purposes and won't actually work since the return statement kills the loop on the first pass.
gulp.task('js', function(){
for (var key in buildConfig.bundle) {
return gulp.src(bundleConfig.bundle[key].scripts)
.pipe(concat(key + '.js'));
// DO STUFF
}
});
That's the basic idea. Any ideas on how to do this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…