sails.js - compilation of sass bootstrap in sails project -


i have sailsjs project. , need install bootstrap-sass version. using grunt-contrib-sass. need ruby installed? can modify grunt, node-sass responsible compilation?

following example: https://github.com/sails101/using-sass

  1. instead of grunt-contrib-sass, use grunt-sass instead avoid ruby dependency:

    • yarn: yarn add grunt-sass
    • npm: npm --save grunt-sass
  2. install bootstrap-sass:

    • yarn: yarn add bootstrap-sass
    • npm: npm --save bootstrap-sass
  3. assuming you've followed along repo instructions linked above, need add bootstrap-sass our imports in sass.js config:

--

module.exports = function(grunt) {    grunt.config.set('sass', {     dev: {       options: {         includepaths: ['node_modules/bootstrap-sass/assets/stylesheets']       },       files: [{         expand: true,         cwd: 'assets/styles/',         src: ['importer.scss'],         dest: '.tmp/public/styles/',         ext: '.css'       }]     }   });    grunt.loadnpmtasks('grunt-sass'); }; 
  1. now can @import "bootstrap" in our sass.

Comments