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

Warning on grunt sprite #62

Closed eduardomello closed 10 years ago

eduardomello commented 10 years ago

I did a fresh install of grunt and grunt-spritesmith on Windows 8 and Ubuntu 12.04 LTS and got the following message on both:

Warning: Cannot read property 'png-engine' of undefined Use --force to continue.

My Gruntfile.js is a copy from your README.

What could be the problem?

Thank you

twolfson commented 10 years ago

Ooh, it looks like I have a regression in my typing for the engine fallbacks.

https://github.com/Ensighten/spritesmith/blob/0.17.1/src/smith.js#L36

I will take care of this by the end of the weekend (including a regression test). For now, you can work around it by specifying the following in your config.

{
  engine: 'png-engine'
}
twolfson commented 10 years ago

Decided against regression test due to cost investment to edge case likelihood. The patch has been released in spritesmith@0.17.3.

If you re-install grunt-spritesmith, the change should be picked up automatically.