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:
and add a line in there:
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 growlnotify-windows.coffee 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:
and when the compiler encounters an exception, you will receive a nice UI prompt like this:
The greatest weakness of XUL apps in my book is how static they feel. They are not as dynamic and rich as HTML documents and as a result development is usually not as easy and elegant. You are forced to restart the application between updates or rely on hacky methods to reload it while running. Being frustrated with these facts, I decided to do something about it. It would be wonderful if you could just press Ctrl+Alt+R and have a fresh stylesheet loaded into your application – much like existing solutions for Google Chrome of Firefox. Here is one way you can do just this in Komodo:
Create this as a macro and assign a key binding to it. Pressing it will discard any previously loaded stylesheet and inject a non-cached fresh copy of it right in the beginning of the document.
This can be simulated in any XUL app – you would need a keypress handler and some code to deal with recognising the correct combination of keys and you are off on a good start.
This is a simple bash script I run from my project’s working directory to get CoffeeScript, Compass and a simple web server running. Any changes to *.(coffee|scss) files will be compiled on the fly. Remember to check the console every now and then if you think you’ve made an whoopsy:
You need an empty compass.config.rb file to be present. Mine usually has some goodness in it:
I was hacking away on an AJAX application and needed to do some XMLHttpRequest goodness. Needless to say, working with the file:// protocol has become very restrictive lately so I was in a need of a simple web server - this meant no configuration, no support, no hassle whatsoever:
and your working directory is now accessible over at http://localhost:8000/