Created
August 30, 2010 22:38
-
-
Save StanAngeloff/558161 to your computer and use it in GitHub Desktop.
Cygwin, CoffeeScript & Growl for Windows integration
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
| { exec } = require 'child_process' | |
| icon = null | |
| require('fs').realpath "#{__dirname}/icon-coffee-cup.png", (exception, path) -> | |
| exec "cygpath -w '#{path}'", (exception, stdout) -> | |
| icon = stdout | |
| process() | |
| queue = [] | |
| process = -> | |
| exec " | |
| growlnotify | |
| '/a:CoffeeScript' | |
| '/i:\"#{ icon.replace(/"/g, '\\"') }\"' | |
| '/r:\"success\",\"exception\"' | |
| '/n:\"exception\"' | |
| '/p:2' | |
| '/s:true' | |
| \"/t:\\\"#{ exception.message.replace(/"/g, '\\"') }\\\"\" | |
| \"#{ exception.stack.replace(/"/g, '\\"').replace(/\n/g, '\\n') }\" | |
| " while exception = queue.shift() | |
| CoffeeScript.on 'failure', (exception, task) -> | |
| queue.push exception | |
| process() if icon |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment