davidtheclark/grunt-spritesmith-hd — pull request #9 by benib (2014-05-20 22:51:48+00:00)
Title: allow scss_maps format

This needs https://github.com/twolfson/json2css/pull/27 to be merged to get usable.
I send this PR in to get opinions on this.

Basically this allows to set `cssFormat` and `cssOpts` and passes them to grunt-spritesmith. `cssFormat` is used to choose the template for the ld sprite. So the only allowed values for `cssFormat` are `scss` (default to not break bc) and `scss_maps` which then leads to the usage of the scss_maps template of json2css.
`cssOpts.mapName` gets overwritten/defined with the `spriteName` to have different mapNames per sprite.
The new `scss_maps-hd.template.mustache` is based on the one from json2css that is changed in the metioned PR to json2css to allow for a configured sass-map name.

A new configuration for spritesmith-hd config could then look like this f.e.:

```js
spriteHD: {
options: {
destImg: 'images/',
destCSS: 'sass/sprites',
cssFormat: 'scss_maps',
},
spriteOne: {
src: ['sprites/spriteTwo/*.png'],
spriteName: 'spriteOne',
},
spriteTwo: {
src: ['sprites/spriteTwo/*.png'],
spriteName: 'spriteTwo',
}
},
```