Created
February 13, 2014 03:37
-
-
Save naganowl/8969332 to your computer and use it in GitHub Desktop.
How to hook into Grunt events.
This file contains 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
['warn', 'fatal'].forEach (level) -> | |
grunt.util.hooker.hook grunt.fail, level, (opt) -> | |
require('growl')(opt.name, | |
title: opt.message | |
image: 'Console' | |
) | |
['warn', 'error'].forEach (level) -> | |
grunt.util.hooker.hook grunt.log, level, (opt) -> | |
require('growl')(opt.name, | |
title: opt.message | |
image: 'Console' | |
) | |
grunt.event.on 'coffeelint:warn', (err, msg) -> | |
require('growl')(msg, | |
title: msg | |
image: 'Console' | |
) | |
grunt.event.on 'coffeelint:any', (status, message) -> | |
grunt.config ['notify', 'coffeelint'], options: | |
title: "Coffeelint #{status}" | |
message: message | |
grunt.task.run 'notify:coffeelint' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment