I'm having an issue where I'm unable to compile a set of LESS file using Globbing.
My structure is this:
+ dir3
- dir3.1
- dir3.1.1
- dir3.1.2
- dir3.2
- dir3.3
- responsive.less
- fixedwidths.less
Each dir has a set of less files and what I'm trying to do is to compile responsive.less and fixedwidths.less but i want to ignore all the remaining folders in dir3
.
My Gulp Glob for compiling less files is:
var paths = {
root: 'Publication/',
source: 'Publication/LESS/',
styles: 'Publication/**/*.less'
}
// Compile less files
gulp.task('styles', function() {
gulp.src([
paths.source+'**/*.less', // compile it all
'!'+paths.source+'**/variables.less', // ignore all variables.less
paths.source+'responsive/*.less', // compile responsive & fixedwidths
'!'+paths.source+'responsive/**/*.less' // ignore all less files in subdir of dir3
])
.pipe(less())
.pipe(gulp.dest(paths.root+'build'))
});
I was expecting that paths.source+'responsive/*.less'
would match responsive.less and fixedwidths.less and '!'+paths.source+'responsive/**/*.less'
would ignore everything else but that's not what seems to be happening. The latter bit code seems to halt all processing of dir3.
Can anything help?