How to use Yeomen with Bourbon and not a compass?

How can I configure Yeoman + Grunt.js to compile Sass without a compass? I would like to use mysbb Bourbon , not Compass. Should I create a custom generator for this, or is it a matter of passing the flag to already existing Joman generators?

+6
source share
2 answers

In your directory:

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

Open Gruntfile.js

  • In the watch task (around line 22) change the โ€œcompassโ€ to โ€œscriptsโ€
  • Change the compass task (around line 109) to "sass", then format according to grunt-contrib-sass docs. My gruntfile gruntfile.js gist .
  • Run a search and replace "compass" with "sass"
  • Install bourbon
+7
source

You can simply disable the grunt-contrib-compass task with grunt-contrib-sass , and then follow the Bourbon install instructions .

+5
source

Source: https://habr.com/ru/post/944139/


All Articles