davidtheclark / grunt-spritesmith-hd

An adaptation of grunt-spritesmith to produce hd-ready sprites
Other
10 stars 5 forks source link

mustache template fix #10

Closed Keytwo closed 10 years ago

Keytwo commented 10 years ago

It would be nice if the mustache template could be customized (i.e. some config option?), a little fix that I suggest (if this does not break anything) is to change the "${{name}}" variable build like this:

${{name}}: ${{name}}-x ${{name}}-y ${{name}}-offset-x ${{name}}-offset-y ${{name}}-width ${{name}}-height ${{name}}-total-width ${{name}}-total-height ${{name}}-image ${{name}}-hd;

This can be useful if some adjustments (such as custom positions or width, etc.) are required before CSS sprite is built.

Thanks for your job ;)

My bests,

-- Valerio

davidtheclark commented 10 years ago

Thanks for the suggestion!

Regarding customizable mustache templates — yes, it would be nice. I'm open to pull requests, but probably won't soon be working on that myself, sorry.

Regarding the change to #{{name}} — I'm having trouble understanding what it is you need that is not already available (in terms of having access to the data). At a glance it looks like the #{{name}} variable you describe would end up with the same values it already gets. Could you describe the use-case in some more detail? Then we could sort it out.