To get the repo up and running on a clean machine, you need the following:
ruby
2.1.xbundler
1.7.x (gem install bundler
)node
0.10.x- The
grunt-cli
global package (npm install -g grunt-cli
)
Everything else will be installed for you.
At time of writing the least irritating way to get these is to install Homebrew. In the future we may automate this bit.
If you want to be able to use a proxy like Charles in conjunction with the output of grunt dev
you will also need a local webserver. MAMP is more or less turn-key and gets the job done.
After you've cloned the repo, run:
cd sass
npm install
npm install
will first run bundle install
to fetch sass and compass, then install the Node dependencies (mostly grunt tasks).
Useful: http://git-scm.com/docs/gitcredentials.html
Running 'grunt' with no parameters is equivalent to running 'grunt watch'
Shows this help, what else do you want?!
One-off compile from the sass to development-friendly css. Uses sass's nested output style, with comments for tracing CSS back to the source SASS. (TODO: Upgrade to sass 3.4 and use sourcemaps instead.) After compiling, the CSS is blessed to split into two files because IE hates you.
One-off compile from sass to production ready css. Uses sass's minified output style. Again IE hates you so this is aslo blessed.
The watch task is set to look for changes to .scss, .html and .php files. If a change occurs grunt will run the dev task as above. It also uses live reload, if you are working on a development .php file from this repo it will automatically refresh any of these open .php files in your browser. How?
##Plumbing task
You can run these directly if you need.
Split the CSS output into multiple files to work around Internet Explorer's 4096-selector limitation. Requires the output of the sass task to work on.
Compile the .scss files. Never just run 'grunt sass'! If you do have a need to use this task, specify a target, either sass:dev or sass:prod.
Saaweeeet.