gulp-less

Gulp.js - Use path from gulp.src() in gulp.dest()

百般思念 提交于 2019-11-28 15:52:42
Trying to create a gulp task that will pipe a bunch of files from different folders through LESS and then output them to a folder based on the original source. Consider this folder structure: Project +-- /Module_A | +- /less | | +- a.less | +- a.css | +-- /Module_B +- /less | +- b.less +- b.css Here's my gulpfile: var gulp = require('gulp'); var gutil = require('gulp-util'); var less = require('gulp-less'); gulp.task('compileLess', function () { gulp.src('./*/less/*.less') .pipe(less()) .pipe(gulp.dest( ??? )); }); gulp.task('default', ['compileLess']); I know gulp.dest() expects a path to be

gulp-watch in combination with gulp-less caching issue

我的未来我决定 提交于 2019-11-28 14:27:09
I have the following setup: // watch for changes gulp.task('watch', function () { gulp.watch('./assets/**/*.less', ['compile-less']); }); gulp.task("compile-less", () => { return gulp.src('./assets/build-packages/*.less') .pipe($.less({ paths: [ $.path.join(__dirname, 'less', 'includes') ] })) .pipe(gulp.dest(OutputPath)); // ./dist/styles/ }); So basically every time a developer changes something in a less file it runs the task 'compile-less'. The task 'compile-less' builds our package less files (including all the @imports). The first change in a random less file works, all the less files

Gulp.js - Use path from gulp.src() in gulp.dest()

≡放荡痞女 提交于 2019-11-27 19:49:25
问题 Trying to create a gulp task that will pipe a bunch of files from different folders through LESS and then output them to a folder based on the original source. Consider this folder structure: Project +-- /Module_A | +- /less | | +- a.less | +- a.css | +-- /Module_B +- /less | +- b.less +- b.css Here's my gulpfile: var gulp = require('gulp'); var gutil = require('gulp-util'); var less = require('gulp-less'); gulp.task('compileLess', function () { gulp.src('./*/less/*.less') .pipe(less()) .pipe