This guide covers pretty much all that you need to have installed in your Mac for a top notch front-end coding environment.
This guide also assumes that you are going to use yeoman or grunt for your project.
It is recommended that you have Xcode installed and it's Command Line Tools to give you any command line binary that you might need (such as wget). You can also download it within Xcode itself
Want to get more productive on the command line? Install ZSH with oh-my-zsh.
Home brew is a sort of package manager for Mac OSX. It's important that you install this one first to make the next steps easier.
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
I recommend that you install nvm to handle your node installation(s).
Install nvm
git clone git://github.com/creationix/nvm.git ~/.nvm
Source nvm to make it available straight away
. ~/.nvm/nvm.sh
Install and use the latest 0.8.x version of node
nvm install 0.8
If you have grunt install globally, uninstall it.
npm uninstall -g grunt
Why? Because from v0.4.x on, grunt should be installed locally per project. You only need grunt-cli globally:
npm install -g grunt-cli
Install Yeoman with node's package manager:
npm install -g yeoman
Then run the script to see if any additional packages are missing:
curl -L get.yeoman.io | bash
In case you need them, they are both Ruby gems. Simply install them by running:
gem install sass
gem install compass