Skip to content

Instantly share code, notes, and snippets.

@StanAngeloff
Created August 30, 2010 22:38
Show Gist options
  • Select an option

  • Save StanAngeloff/558161 to your computer and use it in GitHub Desktop.

Select an option

Save StanAngeloff/558161 to your computer and use it in GitHub Desktop.
Cygwin, CoffeeScript & Growl for Windows integration
{ 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