2createStudio / postcss-sprites

Generate sprites from stylesheets.
MIT License
413 stars 50 forks source link

Spritesheet image buffer as argument to onSaveSpritesheet #62

Closed niksy closed 8 years ago

niksy commented 8 years ago

Would it be possible (and make sense) to add final spritesheet buffer image as argument to onSaveSpritesheet hook?

Use case: you want to name your final files based on exact content inside those images, and you would hash final filename with module like hasha. This way you always get final filename inside your styles based on exact content. Currently the only way I can see that you can get different filename is with some external argument, but you loose caching of large images even if they didn’t change. With hashing final buffer this is avoided.

niksy commented 8 years ago

@vvasilev- have you had any chance to look at this?

vvasilev- commented 8 years ago

I'll look at this on Friday.

On Aug 23, 2016 15:27, "Ivan Nikolić" notifications@github.com wrote:

@vvasilev- https://github.com/vvasilev- have you had any chance to look at this?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/2createStudio/postcss-sprites/issues/62#issuecomment-241729702, or mute the thread https://github.com/notifications/unsubscribe-auth/ABs0-bDGtejpr-4aw_qmR8uWge9jR9xKks5qivU7gaJpZM4JcvMS .