Ensighten/grunt-spritesmith — pull request #55 by chrisdanford (2013-11-25 01:34:30+00:00)
Title: Use the standard grunt "files" mechanism for src images and dest image

This would break compatibility with existing configuration, and I'm looking for feedback. If the direction seems reasonable, I'll update documentation and add tests.

View this with "?w=1". Much of the change is to indenting.

This change migrates off of using raw `this.data` to using `this.files` and `this.options`. There are a couple advantages to this:
- tasks that inspect file deps of other tasks (e.g. "grunt-newer") work correctly
- it will be much easier to parallelize "1 subtask with 10 sprites" than "10 subtasks each with 1 sprite"

Thanks again Todd. We've been using this at Pinterest for a while and love it!

## New configuration examples
### Simple
```
sprite:{
all: {
options: {
destCSS: 'destination/of/sprites.css'
},
src: 'path/to/your/sprites/*.png',
dest: 'destination/of/spritesheet.png'
}
}
```

### Multiple sheets
```
sprite:{
all: {
options: {
destCSS: 'destination/of/sprites.css'
},
files: [
{
src: 'path/to/your/sprites/core/*@1x.png',
dest: 'destination/of/core@1x.png',
},
{
src: 'path/to/your/sprites/core/*@2.png',
dest: 'destination/of/core@2x.png',
},
{
src: 'path/to/your/sprites/detail-page/*@1x.png',
dest: 'destination/of/detail-page@1x.png',
},
{
src: 'path/to/your/sprites/detail-page/*@2x.png',
dest: 'destination/of/detail-page@2x.png',
}
]
}
}
```