Closed nicolehu15 closed 8 years ago
See #220 for our future plans for the sprite format. Most likely we are going to move to an approach such that separate files are not required at all. Until then, I don't think we are likely to change the existing sprite specification, sorry.
I know that if one specifies "sprite": "https://example.com/sprite", renderers would load https://example.com/sprite.json and https://example.com/sprite.png, or https://example.com/sprite@2x.json and https://example.com/sprite@2x.png.
However, is it possible for me to specify the json and png file as separate key values. The issue I am having is that I use rails to cache my assets, resulting in different names for both the json and the png file (ex: sprite-2q4252143.json and sprite-52t342114442.png). The reason why rails does it this way is so that I can easily find out differences in assets on a new push (since the new push will result in addition of different hashes to the assets) and flush out cached images from the client when needed. I'm pretty sure that most systems have images that are cached with appended hashes so as to flush out the cache.
I would like to propose an ability to specify the json and png as arrays instead of just the location of the folder with a reg-ex search