Jasig/sass-maven-plugin — pull request #73 by fragsalat (2014-12-12 09:02:07+00:00)
Title: Sprite compression

In this pull request I use the Sass 3.4.0 and Compass 1.0.1 version.
Additionally I added a Compression of the sprites handled by the tool "pngquant".
With maven the tool is Downloaded from Github and extracted into the gems folder.
Inside the AbstractSassMojo I added some Ruby code to act when sprite_saved callback is triggered.
With these tool i could compress a sprite from 193kb to 31kb without any visible quality loss.
The sprite compression can be Activated using the property sass.compress_sprites true.

Note: In the Project I use the sass-maven-plugin sass had problems with the compass scss files within the jar.
The date was something around 2053 (max int) so the files where compiled every time.
To work around these I extracted the content of the sass-maven-plugin jar into the target folder and access the stuff from these point.

Here the development config I used in my project

```xml

:expanded
false
false
'./.sass-cache'
true
true
true
false

org.apache.maven.plugins
maven-dependency-plugin
2.8

unpack
prepare-package

unpack

org.jasig.maven
sass-maven-plugin
1.1.2.smava
jar
true
${basedir}/target/rubygems
sass-maven-plugin-1.1.2.smava.jar
**/*

org.jasig.maven
sass-maven-plugin
1.1.2.smava

prepare-package

update-stylesheets

${sass.always_update}
true
${sass.always_check}
${sass.cache_location}
${sass.cache}
${sass.full_exception}
${sass.sourcemap}
${sass.compress_sprites}

true

${basedir}/src/main/webapp/sass

*.scss

${basedir}/src/main/webapp/css

```