Skip to content

Instantly share code, notes, and snippets.

@kinopyo
Created July 3, 2011 17:17
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save kinopyo/1062397 to your computer and use it in GitHub Desktop.
Save kinopyo/1062397 to your computer and use it in GitHub Desktop.
How to install coffee-script, and how to enable textmate bundler to compile coffeescript
# don't forget to update your port tree first
sudo port selfupdate
# install coffee script using macport
sudo port install nodejs
node -v
# install npm - the Node Package Manager
git clone http://github.com/isaacs/npm.git
cd npm
sudo make install
npm -v
# now install coffee-script!
sudo npm install -g coffee-script
coffee -v
# because TextMate doesn't inherit your regular PATH
# you need to set a symbol link to /usr/bin
# so that you can run coffee in your textmate
which node
/opt/local/bin/node
which coffee
/opt/local/bin/coffee
cd /usr/bin
sudo ln -s /opt/local/bin/node
sudo ln -s /opt/local/bin/coffee
# install textmate coffee-script bundle
mkdir -p ~/Library/Application\ Support/TextMate/Bundles
cd ~/Library/Application\ Support/TextMate/Bundles
git clone git://github.com/jashkenas/coffee-script-tmbundle CoffeeScript.tmbundle
# now you can use command + B to compile and display javascript in your textmate!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment