twolfson / grunt-spritesmith

Grunt task for converting a set of images into a spritesheet and corresponding CSS variables
MIT License
1.14k stars 92 forks source link

It posible add ?v=xx preffix to generated css #143

Closed Bogdaan closed 9 years ago

Bogdaan commented 9 years ago

When i generate new sprite - old users fetch "icons.png" from local cache It posible generate version preffix to output background-image?

twolfson commented 9 years ago

The simplest way for a numeric based prefix would be to generate a timestamp as part of the filename:

dest: 'icons?v=' + Date.now() + '.png'

If you are interested in using an MD5 hash instead of a timestamp, please see #27