Cygwin, CoffeeScript & Growl for Windows integration

Let’s start by adjusting where node.js looks for libraries. We will need this later on when we use the newly implemented -r command-line switch in CoffeeScript. Open up your shell init file, in my instance ~/.zshrc:

$ vim ~/.zshrc

and add a line in there:

export NODE_PATH="/cygdrive/d/Workspace/public/coffee-script/.coffee_libraries:$NODE_PATH"

The path can be anywhere on your system so adjust it accordingly. Let’s go ahead and create a file inside .coffee_libraries, name it and paste this code inside of it:

We also need a proper icon – save it in the script folder as icon-coffee-cup.png.

Next time you run the coffee command line utility, append -r growlnotify-windows like so:

$ coffee -r growlnotify-windows -wc src/

and when the compiler encounters an exception, you will receive a nice UI prompt like this:

Smokestack theme preview

Happy coding!