grunt-sass vs grunt-contrib-sass

If you use grunt-contrib-sass to compile your SCSS code into CSS I recommend taking a look at grunt-sass. It can be used as an drop in replacement for grunt-contrib-sass but with one major difference: speed.

grunt-contrib-sassuses a Sass compiler written in Ruby. It works just fine for projects where you don’t have a lot of SCSS to process but once you start getting into the hundreds of kilobytes there’s a noticeable slow down in the time it takes to generate your CSS files. grunt-sass gets around this by using libsass which is a compiler written in C++. It’s blazingly fast with large files and data.

To install grunt-sass to your project, simply run the following command:

yarn add grunt-sass

There’s no need to worry about installing the compiler itself as the package will download a pre-compiled binary as one of it’s dependencies.


Post Meta

Filed under: Code
Tags: , , , ,

About the author


Comments