           //  @include sprites();     // will output to CSS all your sprites
           //  @include sprite(arrow); // will output to CSS `.sprite--arrow { ... }`
 
-          $grunt-sprites: (<% for (sprite of sprites) { %>
-            '<%= sprite.name %>': ( width: <%= sprite.px.width %>, height: <%= sprite.px.height %>, offset-x: <%= sprite.px.offset_x %>, offset-y: <%= sprite.px.offset_y %> ),
-          <% } %>);
-        """
-
-        return template(tmpl)(data)+          $grunt-sprites: (
+            #{ data.sprites.map((sprite) -> "'#{ sprite.name }': ( width: #{ sprite.px.width }, height: #{ sprite.px.height }, offset-x: #{ sprite.px.offset_x }, offset-y: #{ sprite.px.offset_y } )").join(',\n  ') }
+          );
+        """
      engine: 'gmsmith'
      cssTemplate: (data) ->

        tmpl = """
          // =======================================
          // ^SPRITES.MAP
          // =======================================

###
Spritesmith
https://github.com/Ensighten/grunt-spritesmith
