I really like gulpjs, it was my choice task manager, but I wanted to know about task managers a few months ago and got into gruntjs, mainly for support. It's hard for gulpjs to find information about specific things.
My question is how to configure my gulpfile.js so that I can edit bootstrap.less files, namely variables.less . I installed " gulp-less " and implemented it as shown below.
var less = require('gulp-less'), path = require('path'); gulp.task('less', function () { gulp.src('./source/less/variables.less') .pipe(less()) .pipe(gulp.dest('./source/css/bootstrap.css')); });
I got the error below after running gulp less .
events.js:72 throw er; // Unhandled 'error' event ^
Error: EEXIST, mkdir 'C:\wamp\www\myproj\source\css\bootstrap.css'
I donโt think my sass task setup code is correct, Iโm gulp noobie, but I tried several combinations, and yes, I used the example from gulp-less ", the code I used was the shortest clear code that I want to execute .
Edit: I found good words for this on google. I found some recent posts about this, here is one Running gulp with Gulp without supporting the folder structure doesn't seem like there is a good answer to read.
Optional: I forgot when using the code from the documents, I get an error message with alerts.less
gulp.task('less', function () { gulp.src('./source/less/*.less') .pipe(less({ paths: [ path.join(__dirname, 'less', 'includes') ] })) .pipe(gulp.dest('./source/css')); });
Mistake
stream.js:94
throw er; // Unhandled stream error in pipe.
^
[gulp] Error in plugin 'gulp-less': variable @alert-padding is undefined in file C:\wamp\www\myproj\source\less\alerts.less line no. 10
Even when I delete this line, it just keeps finding new errors.
Edit: Documents say the following, but it doesnโt make sense to me if he says there should be a mistake, if this is so confusing, I will try to follow the guidelines provided.
Error processing
By default, the gulp task will fail, and all threads will stop when an error occurs. To change this behavior, check out the error handling documentation here.