Command-line Foundation

Okay, so it’s a bit like casting spells, but when everything’s up and running (Windows or OSX, so cmd or Terminal, and got Ruby smiling on both …actually with OSX being the biggest pain to get the right version)


On OSX, best way to update Ruby is with RVM …which in turn requires Homebrew, installed with

ruby -e "$(curl -fsSL"

…which is why, despite OSX actually shipping with Ruby (an old version), this presented a few challenges!

Need Bower, too:

[sudo] npm install -g bower grunt-cli

As per this video Getting started with SASS from Zurb

foundation new project_name --libsass

This is the preferred way with Foundation 5 because it’s faster… although the Compass instructions are even easier

foundation new MY_PROJECT

This is as per, although there’s some business around updating gems

Getting Compass to watch is as simple as cd-ing into the main sites folder and typing:

compass watch

That’s it!

SASS Overrides

For example, customizing the appearance of a navbar

Obviously the route is SASS …but where to put the customisations? It seems that the way is to use a separate partial called something catchy like overrides

@import "settings";
@import "foundation";
@import "overrides"; 

Actually, that’s not quite right, as I posted on the Foundation Forum

@import "overrides";
@import "settings";
@import "foundation"; 

Overrides needs to appear first!