Skip to content

Instantly share code, notes, and snippets.

@gunlinux
Last active October 11, 2015 12:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save gunlinux/e8b2febe13b915e67f63 to your computer and use it in GitHub Desktop.
Save gunlinux/e8b2febe13b915e67f63 to your computer and use it in GitHub Desktop.
var notify = require('gulp-notify');
function log() {
var args = Array.prototype.slice.call(arguments);
// Send error to notification center with gulp-notify
notify.onError({
title: 'Compile Error',
message: '<%= error %>'
}).apply(this, args);
// Keep gulp from hanging on this task
this.emit('end');
};
@gunlinux
Copy link
Author

gunlinux commented Sep 9, 2015

gulp.task('test:css', function () {
    return gulp.src(css)
        .pipe(postcss([
            require('stylelint')(config),
            require('postcss-reporter')({
                clearMessages: true,
            }),
        ]))
        .on('error', log);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment