grunt-contrib-sprites-preprocessor
A grunt wrapper around https://github.com/madebysource/sprites-preprocessor
The only sprites generator I found, that handles CSS replacement well enough.
usage
grunt.initConfig({
'sprite-preprocessor': {
options: {
spriteFileName: 'sprite.png',
srcImagesDir: 'src/assets',
cssUrlsPrefixedWith: 'assets/',
spriteDestDir: 'dist/assets'
separator: '',
filter: 'isFile'
},
files: {
'dest/style.with.sprites.css': ['src/style.css' ]
}
}
});
grunt.loadNpmTasks("grunt-contrib-sprites-preprocessor");
npm install grunt-contrib-sprites-preprocessor
grunt sprites-preprocessor
requirements
whatever spritesmith requires, I had to
sudo npm install -g phantomjs
# and
export PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig