Blog

5 Steps to Get Started with CoffeeScript

One of the easiest ways to use CoffeeScript is as a Node.js package. Here are 5 quick steps to get Node and compile your first .coffee file:

  1. Install Homebrew1, a package manager for Mac. May need GCC (to make Homebrew).
    /usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"
  2. Install Node with Homebrew
    brew install node
  3. Install npm, Node Package Manager
    curl http://npmjs.org/install.sh | sh
  4. Install CoffeeScript globally2
    npm install coffee-script --global
  5. Compile .coffee files in your current directory
    coffee --compile .

  1. Homebrew is a great solution for managing packages on your Mac. Node can be installed manually without Homebrew. ↩

  2. By default, npm installs packages to your current working directory. Using the –global flag makes CoffeeScript available system-wide. ↩