Gulp pipe to separate destination folders -
i writing gulp task goes through several folders , watches less files. want pipe compiled css same folder less file came from. unfortunately, can't seem find way give each of files separate output folder.
gulp.task('less:watch', function() { watch({ glob: 'src/**/less/**/*.less', emit: 'one', emitonglob: false },function(files){ homecoming files .pipe(less({ paths: [ path.join(__dirname, 'less', 'includes') ] })) // need pipe files folder generated .pipe(gulp.dest(path.join(__dirname, 'less'))) .on('error', gutil.log); }); });
i believe can process 1 file @ time gulp.watch
:
gulp.task('less:watch', function() { gulp.watch('src/**/less/**/*.less',function(evnt) { homecoming gulp.src(evnt.path) .pipe(less({ paths: [ path.join(__dirname, 'less', 'includes') ] })) .pipe(gulp.dest(path.dirname(evnt.path))) .on('error', gutil.log); }); });
gulp gulp-less gulp-watch
No comments:
Post a Comment