Compile Sass to CSS using sass.js
This task uses sass.js, which is a Sass compiler written in JavaScript. It's not as fast as the C implementation node-sass but it is completely stand alone and doesn't require downloading binaries or installing anything.
$ npm install --save-dev grunt-contrib-sassjs
grunt.initConfig({
sass: {
dist: {
sourceMap: true,
files: {
'main.css': 'main.scss'
}
}
}
});
grunt.registerTask('default', ['sass']);
Files starting with _
are ignored to match the expected Sass partial behaviour.
See the sass.js
options.
MIT