Skip to content

Instantly share code, notes, and snippets.

@kohgpat
Forked from gunlinux/gulp errors handle
Last active September 9, 2015 03:33
Show Gist options
  • Save kohgpat/7f52ac174d9b2f8b6552 to your computer and use it in GitHub Desktop.
Save kohgpat/7f52ac174d9b2f8b6552 to your computer and use it in GitHub Desktop.

Revisions

  1. @gunlinux gunlinux renamed this gist Sep 9, 2015. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. @gunlinux gunlinux created this gist Sep 9, 2015.
    13 changes: 13 additions & 0 deletions gulp handaling errors
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    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');
    };