Skip to content

n-irwin/vic_sass

Repository files navigation

Check the wiki yo!

Getting started

To get the repo up and running on a clean machine, you need the following:

  1. ruby 2.1.x
  2. bundler 1.7.x (gem install bundler)
  3. node 0.10.x
  4. 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

Grunt tasks

grunt

Running 'grunt' with no parameters is equivalent to running 'grunt watch'

grunt help

Shows this help, what else do you want?!

grunt dev

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.

grunt prod

One-off compile from sass to production ready css. Uses sass's minified output style. Again IE hates you so this is aslo blessed.

grunt watch

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.

grunt bless

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.

grunt sass:[task]

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published