Skip to content

gulp-less print out nothing error in case extend a non-existing mixin #27

Description

@cnweibo

@johnpapa ,
I have followed your course and everything works well, also, i have added some more gulp tasks successfully.
Unfortunately, i have met a problem for gulp-less. Can you give a hand?

Here i copied something for your help:
I have posted a thread in stackoverflow about gulp-less. I want to know how to deliver error information when an error happens during extend a non-existing mixing/class.
http://stackoverflow.com/questions/34107876/is-there-any-way-to-let-gulp-less-print-error-in-case-extend-a-non-existing-mixi
gulp-community/gulp-less#206

Can you have a look and give me clue. Following is copied from stackoverflow:

In my less build process, i use the gulp-less. In the build process, i use gulp-plumber to print out error information during that build. It works well for the less syntax error, reference to non-exist variables. Unfortunately, the gulp-less build task print out nothing in case we extend a non-existing mixin/class. Does anyone know about how to enable such kind of "error" or even warning during the build? Following is the gulpfile:
gulp.task('less',function(){
var pagelessentry = config.pagelessentry;
log(pagelessentry);
return gulp
.src(pagelessentry)
.pipe(plumber({
errorhandler: errorhandler
}))
.pipe(debug({
title: 'LESS'
}))
.pipe(sourcemaps.init())
.pipe(less())
.pipe(uncss({
html: ['index.html', 'http://homestead.app'],
ignore: [/header-down/,/header-up/]
}))
.pipe(sourcemaps.write(projectrootdir+'public/preparebuild/assets/css/',{includeContent: true}))
.pipe(gulp.dest(projectrootdir+'public/preparebuild/assets/css/'));
});
Following is the "wrong" less code where i want gulp to print out some "error or warning" information:
.footer{
background-color: @primary-background;
&:extend(.NONEXISTING all);
}
In above code, when we extend .NOEXISTING mixin, nothing printed out.
It is quite annoying thing.
Please help me out
Thanks~!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions