Last Updated: February 25, 2016
·
7.322K
· rob wierzbowski

Using Bower with Compass

There's a little-documented setting that makes it easy to use Compass extensions with Twitter's awesome front-end package manager <a href="http://bower.io">Bower</a>.

In your project's config.rb, add:

extensions_dir = "bower_components" 

...or use the directory you've set in your .bowerrc.

Now everything you place in bower_components/ is automatically available as an ad-hoc extension (more information about half way down the page).

You don't need to install the gem globally with gem install, or use an RVM Gemfile. You don't even have to require the extension in your config.rb. Just import it by name in an .scss file and you're good to go.

Read more about how you can use Bower to manage your front-end packages on Bower.io.