-
Notifications
You must be signed in to change notification settings - Fork 32
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
Not working with gulp-sass #32
Comments
+1 |
Good news - there is nothing wrong in @realph could you remove all plugins below |
So when I remove all the plugins below
I still get the same error message, when I deliberately make errors in my CSS. Plumber doesn't seem to be working.
|
@realph Try calling gulp-sass with See https://github.com/dlmanning/gulp-sass/wiki/Common-Issues-and-Their-Fixes#gulp-watch-stops-working-on-an-error for an explanation. |
@sandhilt That seems to have fixed it. Thanks! |
Hm, it's best to use |
@holic - GG worked like a charm after your suggestion to "rtfm" :) |
@sandhilt, @realph : Just be aware that removing |
@gligoran - Yeah and that ended up not being an option for me. I managed to get it working with the |
@joshtoo how did you get it to work? |
@TheAggressive - If you can point me to a repo i'll take a look at your gulp build. |
@joshtoo I got it to work this way: gulp.task('sass', function() {
return gulp.src('scss/style.scss')
.pipe(plumber())
.pipe(sass.sync({ // Have to use sass.sync - See Issue (https://github.com/dlmanning/gulp-sass/issues/90)
outputStyle: 'compressed',
errLogToConsole: true
}))
.pipe(autoprefixer({
browsers: ['last 2 versions', 'ie >= 9']
}))
.pipe(gulp.dest('./'));
}); would that do the trick? |
var $ = require('gulp-load-plugins')({lazy: true}); // John Papa tip for shortening the require list
gulp.task('sass', ['clean-sass'], function() {
log('SASS Compilation ==> CSS3');
return gulp
.src(conf.sass)
.pipe($.plumber())
.pipe($.sass())
.on('error', $.sass.logError)
.pipe($.autoprefixer({browsers: ['last 2 version', '> 5%']}))
.pipe(gulp.dest(conf.tempDir));
}); |
@joshtoo Thanks!! |
@TheAggressive No problem :) |
Related to this `gulp-plumber` issue: floatdrop/gulp-plumber#32 Without this fix, gulp watch task breaks when compiler does.
Removing return worked for me // before
gulp.task('sass', function () {
return gulp.src(config.sass.input)
.pipe(plumber())
.pipe(sass())
})
// after
gulp.task('sass', function () {
gulp.src(config.sass.input)
.pipe(plumber())
.pipe(sass())
}) |
My terminal still returns an error and breaks my task when there's an error in my Sass. This is what my task looks like:
Any idea why it keeps breaking? Any help is appreciated. Thanks in advance!
The text was updated successfully, but these errors were encountered: