Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using libsass with compass

Exactly as the title says. Compilation times over 50 seconds are unacceptable. So, is there a way, let's say: a single (partial) file with compass magic (like sprite mixins, etc.), and the rest of files with pure sass?

I'm considering moving to less (reference importing), and substituting all compass tricks with additional grunt tasks, but I'm more comfortable around sass than less.

I saw those tickets, but I hoped there would be a way to compile a single file with compass, and the rest to be merged with libsass (I sometimes use sass 3.3 syntax, but if I can gain better compile times I can revert to 3.2).

Did anyone succeed in such configuration?

like image 264
Misiur Avatar asked Sep 28 '14 19:09

Misiur


1 Answers

In our case (>100.000 LoCSS), we succesfully moved from grunt-contrib-compass to a combination of

grunt-sass

which is using libsass instead of the ruby version, and to get all the magic from compass, we included

compass-mixins

and it worked just fine. You should definitely try it out, we reduced our compilation time from more than 40sec down to just 500-600ms.


UPDATE 2

Here's a node module that automagically imports the lib mentioned above into your grunt enviroment:

https://github.com/haithembelhaj/compass-importer

UPDATE

Creating a port to libsass is clearly on the creators mind: https://github.com/Compass/compass/issues/1916

like image 163
stffndtz Avatar answered Oct 15 '22 14:10

stffndtz