I am a fan of Homebrew. Once you installed it, you can just do
brew install node
then install npm with
curl http://npmjs.org/install.sh | sh
then use it to install CoffeeScript with
npm install -g coffee-script
If you donβt have Homebrew or donβt want to bother him, replace the first step with http://nodejs.org/ by clicking Download and running the latest installer for OS X. No command line is required.
Update:. Since this answer has been posted, some things have changed. One of them is that Homebrew includes npm, so you do not need to install it separately (and if you do, you need to use https:// ). Another is that I recommend using nvm to install Node, not Homebrew, as you will most likely want to use different Node versions for different projects at some point and replacing brew versions is not fun.
Trevor burnham
source share