I have a folder full of LESS files in my app folder. There a 2 main files and several includes, all of which are prefixed with "_". I want to only output those 2 files and their sourcemaps to my build folder, but of course the default setup outputs ALL the less files:
var gutil = require('gulp-util');
var changed = require('gulp-changed');
var path = require('path');
var less = require('gulp-less-sourcemap');
gulp.task('less', function() {
gulp.src('./app/less/*.less')
.pipe(less({
generateSourceMap: true, // default true
paths: [path.join(__dirname, 'less', 'includes')]
}))
.pipe(gulp.dest('./build/css'));
});
I suppose I could put my includes in a sub-directory, but I'd rather not have to edit the LESS if I didn't have to.
UPDATE
I know how to specify a single file in gulp.src
but I have 2 LESS file that need to be made into 2 CSS files each with its own map.