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' | |
}); | |
}); | |
}); |