I'm trying to use gulp to compile a less file into css. I have this working on another project but not on this one.
the task in my gulpfile.js
looks like this:
gulpfile.js
var sourceLess = './app/assets/stylesheets/less';
var sourceJs = './app/assets/javascripts';
var targetCss = './public/css2';
var targetJs = './public/js2';
// Compile my-bootstrap-theme
gulp.task('css', function() {
gulp.src(sourceLess + '/custom/edgc-styles.less')
.pipe(less())
.pipe(gulp.dest(targetCss))
.pipe(minifyCss())
.pipe(gulp.dest(targetCss));
});
My edgc-styles.less
file includes an @import
which in turn includes an @import
as follows:
//my custom stylsheet
@import "../bootstrap/bootstrap.less";
@import "custom-variables.less";
@import "custom-fonts.less";
and in the bootstrap.less
file it starts like this:
// Core variables and mixins
@import "variables.less";
@import "mixins.less";
In my output all I get is the comment at the start of the bootstrap.less file and blank after.
I can't work out how to log for errors in gulp (on a windows machine) to see what's going on but assume it's failing on trying to import variables.less
. this is a valid file and exists in the same directory as bootstrap.less
What directive am I missing in the gulp configuration? I'm new to gulp so not sure of all it's features and how to traverse directories properly.
Any help appreciated