asciidisco / grunt-imagine

Grunt tasks for optimizing & inlining images
MIT License
153 stars 21 forks source link

Fix for Sprite Generation #14

Closed dominicbarnes closed 12 years ago

dominicbarnes commented 12 years ago

Howdy, I found a bug (#5) in the sprites task. The last file in the list generated by src was always being left out. And in the case where only 1 image exists in a sprite, nothing happens at all.

I opted to use async.js to help control the async flow of reading the files into memory. It shortens the code, makes it more readable, and less prone to "off-by-one" errors such as this one.

asciidisco commented 12 years ago

Awesome ;) Thank you. Is available in npm like in 5 minutes or so ;)