Setting up CoffeeScript on ubuntu

As I mentioned in a previous post, I recent learnt about CoffeeScript, a quick way of writing nice clean Javascript. The CoffeeScript website has instructions for installing the compiler, first requiring installation of Node.js, which a lot of tutorials show you how to install from Git, and also requiring NPM which is usually installed by curling a shell script directly into bash(!). On Ubuntu, the install process is much simpler and less ripe for security holes:

  1. Only required if running 10.04 LTS (Lucid Lynx):
    sudo add-apt-repository ppa:chris-lea/node.js
    sudo apt-get update
  2. sudo apt-get install nodejs npm
    sudo npm install -g coffeescript

Check that CoffeeScript is installed correctly by running

coffee -v
Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *