-
-
Save bicherele/7892212 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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