I have SailsJs project. And need to install bootstrap-sass version.
I am using grunt-contrib-sass
. But do I really need ruby installed?
Can I modify grunt, so node-sass will be responsible for compilation?
Asked
Active
Viewed 807 times
2

userbb
- 2,148
- 5
- 30
- 53
1 Answers
0
Following this example: https://github.com/sails101/using-sass
Instead of
grunt-contrib-sass
, usegrunt-sass
instead to avoid the Ruby dependency:- Yarn:
yarn add grunt-sass
- NPM:
npm i --save grunt-sass
- Yarn:
Install
bootstrap-sass
:- Yarn:
yarn add bootstrap-sass
- NPM:
npm i --save bootstrap-sass
- Yarn:
Assuming you've followed along with the repo instructions linked above, we need to add
bootstrap-sass
to our imports in thesass.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');
};
- Now we can simply do
@import "bootstrap"
in our sass.

Cisco
- 20,972
- 5
- 38
- 60