Skip to content

Instantly share code, notes, and snippets.

@bicherele
Forked from FGRibreau/grunt_growl.js
Created December 10, 2013 15:14
Show Gist options
  • Save bicherele/7892212 to your computer and use it in GitHub Desktop.
Save bicherele/7892212 to your computer and use it in GitHub Desktop.
/* Inside grunt.js file (don't forget to add "growl" as a project dependency) */
grunt.utils.hooker.hook(grunt.fail, "warn", function(opt) {
require('growl')(opt.name, {
title: opt.message,
image: 'Console'
});
});
/* ... or, since fail.fatal() will stop grunt it seems a good idea to track it too */
var growl = require('growl');
['warn', 'fatal'].forEach(function(level) {
grunt.utils.hooker.hook(grunt.fail, level, function(opt) {
growl(opt.name, {
title: opt.message,
image: 'Console'
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment