Ensighten/grunt-spritesmith — pull request #28 by dpolivy (2013-08-06 18:41:31+00:00)
Title: Sort output variables based on filename

Fix for Issue https://github.com/Ensighten/grunt-spritesmith/issues/26. I opted to go for the simple approach, which is to pre-sort the data passed in to json2css, and convert from an object to an array prior to passing it in.

I looked at modifying the tests to do exact file compares instead of the line-matching you currently have (which I assume was partially due to the varying order of results), but I wasn't sure if that would break something else. I'm happy to add that in if you think it would be valuable.

I also chose to leave json2css alone, in that it can still accept objects if desired. It already works just fine with arrays passed in, so I chose to utilize it as-is.