Search code examples
javacssmavencompass-sass

Compass/sass alternatives for Java


We are using Compass/SASS for our CSS with maven plugin which does this with JRuby and it is EXTREMELY slow. It takes over 4 minutes to compile our CSS on the latest i7 with 16Gb of memory available to Java. Our maven plugin looks like this:

        <plugin>
            <groupId>de.saumya.mojo</groupId>
            <artifactId>gem-maven-plugin</artifactId>
            <version>0.29.4</version>
            <extensions>true</extensions>
            <executions>
                <execution>
                    <id>compassProcessSource</id>
                    <goals>
                        <goal>exec</goal>
                    </goals>
                    <phase>process-resources</phase>
                </execution>
            </executions>
            <configuration>
                <execArgs>${project.build.directory}/rubygems/bin/compass  compile -c ./compass/config.rb --time  --sass-dir=${basedir}/src/main/java/com/company/ --css-dir=${project.build.directory}/classes/com/company/ --output-style=${pom.compass.compression.style}</execArgs>
            </configuration>
        </plugin>

Are there any alternative to compass which are more performant? Or is there a way to run it faster?


Solution

  • I recommend trying out Wellington, http://getwt.io. I'm the author of Wellington an Open Source spriting tool that supports Sass syntax. It is an order of magnitude faster than Compass.