Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use Yeoman with Bourbon rather than Compass?

How would I go about setting up Yeoman + Grunt.js to compile Sass without Compass? I'd like to use thoughtbot's Bourbon rather than Compass. Would I need to create a custom generator for this or is it a matter of passing a flag to the already existing Yeoman generators?

like image 982
David Avatar asked May 02 '13 17:05

David


2 Answers

In your directory:

  1. npm uninstall grunt-contrib-compass --save-dev (removes compass from node_modules and package.json)
  2. npm install grunt-contrib-sass --save-dev (adds sass to node_modules and package.json)

Open up Gruntfile.js

  1. In the watch task (around line 22) change "compass" to "scripts"
  2. Change the compass task (around line 109) to "sass" then format according to the grunt-contrib-sass docs. My gruntfile gruntfile.js gist.
  3. Run a find and replace "compass" to "sass"
  4. Install Bourbon
like image 103
bhuizi Avatar answered Sep 22 '22 17:09

bhuizi


You can just switch out the grunt-contrib-compass task with grunt-contrib-sass and then follow the Bourbon install instructions.

like image 32
Sindre Sorhus Avatar answered Sep 23 '22 17:09

Sindre Sorhus