javascript - Gulp for loop not iterating -


this question has answer here:

i working on new gulp build process , reason can not loop, runs fine generates first less file never iterating.

var files = ['style.less', 'core.less', 'theme.less'] gulp.task('build', function () {     (var = 0; < files.length; i++) {         return gulp.src(lessdir + files[i])         .pipe(plumber({             errorhandler: onerror         }))         .pipe(less()).pipe(notify(files[i] + " rendered!"))         .pipe(csscomb()).pipe(notify(files[i] + " sorted!"))         .pipe(cssbeautify({             indent: '  ',             autosemicolon: true         })).pipe(notify(files[i] + " spaced!"))         .pipe(gulp.dest(cssdir))         .pipe(minifycss({             keepbreaks: false,             processimport: true,             noadvanced: false         }))         .pipe(gulp.dest(cssmindir)).pipe(notify(files[i] + " minified!"));     } }); 

return return overall task, loop go through 1 iteration.

better specify files in gulp.src gulp.src(files) after changing files array include lessdir. let gulp's .pipe send each of files through pipeline.


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -