Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Less plugs pipe? #120

Closed
mandulaj opened this issue Jan 6, 2015 · 4 comments
Closed

Less plugs pipe? #120

mandulaj opened this issue Jan 6, 2015 · 4 comments

Comments

@mandulaj
Copy link

mandulaj commented Jan 6, 2015

When used with gulp-connect like this:

var plumber = require('gulp-plumber');
var less = require('gulp-less');
var connect = require('gulp-connect');

//...
gulp.task("less", function() {
  gulp.src(paths.less)
    .pipe(plumber())
    .pipe(less())
    .pipe(gulp.dest("build/css"))
    .pipe(connect.reload()); // should reload the browser
});
//....

... the browser never gets reloaded.

When the .pipe(less()) is omitted, the browser reloads fine. Thus it must be a less problem.

@kwerty
Copy link

kwerty commented Jan 6, 2015

Also having this problem -

gulp.task('less', function(){
gulp.src('./css/less/*.less')
    //.pipe(less())
    .pipe(gulp.dest('./css/compiled'))
    .pipe(notify("Less compiled."));
});

With pipe(less()) commented out the css files are outputted to the /css/compiled directory, but if I uncomment this line no css files are generated

@kwerty
Copy link

kwerty commented Jan 6, 2015

Turns out my problem was a syntax error in the less file, didn't realise the error is silently swalllowed. Used gulp-util to log the error.

var util = require('gulp-util');

gulp.src(less_paths)
    .pipe(less()).on('error', util.log)

@mandulaj
Copy link
Author

mandulaj commented Jan 6, 2015

I am using gulp-plumber for that. I strongly recommend it!!

@yocontra
Copy link
Member

yocontra commented Jan 6, 2015

Duplicate of #118

@yocontra yocontra closed this as completed Jan 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants