Skip to content

Instantly share code, notes, and snippets.

@jramb
Created February 2, 2012 19:56
Show Gist options
  • Save jramb/1725411 to your computer and use it in GitHub Desktop.
Save jramb/1725411 to your computer and use it in GitHub Desktop.
Installing Coffee-script on Ubuntu
# install (old) nodejs package and npm
$ sudo apt-get install nodejs npm
# install coffee-script (globally)
$ sudo npm install -g coffee-script

Test driving it

square = (x) -> x * x

console.log square 5
coffee -c test.coffee       # produces test.js
coffee -cw test.coffee      # same but watches the file
coffee test.coffee --nodejs # runs it automatically through nodejs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment