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

Retina images, optional? #167

Closed karedas closed 1 month ago

karedas commented 6 years ago

Hi, I have encountered a problem with your plugin. I have set the necessary options so that spritesmith processes the retina images, configuring what he needed (target path, name etc) and it works great.

However, I noticed that if I don't need to create retina images for some of these, the plugin will be mistaken by telling me that I need suffix images to complete the procedure.

events.js:112
      throw er; // Unhandled 'error' event
      ^

Error: Retina settings detected but 5 retina images were found. We have 13 normal images and expect these numbers to line up. Please double check `retinaSrcFilter`.

The most trivial solution would be to create two different tasks and specify the folder with "standard" and "retina" images and a task with the folder with "standard" images only. But it seems rather ugly.

Can this control be made optional?

(sorry for my bad english!)

twolfson commented 6 years ago

Could you explain your use case a little more? I don't understand when someone would need retina images sometimes and not all of the time