# grab a copy of Sage from github
$ git clone --depth=50 --branch=master git://github.com/roots/sage.git roots/sage
# move into the directory where Sage was installed
$ cd roots/sage
$ npm install -g bower gulp jscs # Sage tests include the install for jscs this way. docs don't mention it.
# now check to ensure that you have the requirements installed, with prerequisite versions
# optional: $ composer --version
$ php -v && node -v && gulp -v && bower -v
# you should have:
# PHP >= 5.4.x (test uses 5.6.5)
# Node = v0.10.36 <--- this is what Sage tests for, not what's required. it works for me!
# on Windows 8 it worked for me with the 0.12.0 version
# gulp = 3.8.10
# Bower >= 1.3.12
# if you don't have what's listed above, come back to this point when you do.
$ npm install -g npm@latest # currently, "latest" is v2.8.3
$ npm install # <---- this is the big one. it might take a moment. note any errors. if any, stop here to fix.
# these next composer steps are optional, if you want to setup composer
# $ composer self-update && composer --version
# $ export PATH="$HOME/.composer/vendor/bin:$PATH"
# $ composer global require squizlabs/php_codesniffer
$ npm run build # run some more build stuff
$ gulp --production # make some production files for the first time
$ npm run jshint # make sure this works
$ npm run jscs # test this out too