nicholasstephan/grunt-spritesheet — pull request #9 by hankpillow (2014-04-24 14:21:14+00:00)
Title: PR to version 0.1.6

Hi guys, first of all this is a very handy task, congrats.

I'm using this task in a project and I missed some data to render my mustache template the way I need.

So I added a few properties to this object and made some minor tweak on the code.

Now inside the mustache template you can get the task's target data object and the grunt.config too. It's really useful because you can add some extra helper to create richer css output.

The last property I created was 'targets' the gives you the ability to separate the output data for every sprite you have inside your array. By this way, now you can create named mixin and group only the sprites used by a specific context.

````
{{#targets}}
@mixin {{&config.helper_strip_name}} () {

//
// only one image request
//

{{#std}}.{{&name}}, {{/std}} .grunt-blob {
background-image: url({{&out}}?v={{config.today}});
}

//
// class list
//

{{#std}}
.{{&name}} {
width: {{width}}px;
height: {{height}}px;
background-position: -{{x}}px -{{y}}px;
}
{{/std}}
}
{{/targets}}
```

`config.helper_strip_name` <- is a helper that returns the spritesheet's name
`config.today` <- is a property on config's object ("<%= grunt.template.today('dd-mm-yyyy') %>")

The README is updated.

I hope you guys found this useful too.

regards,