Closed Stratus3D closed 9 years ago
Ah, yep. That is definitely an error. The latest minor release should be getting rolled back soon.
https://github.com/twolfson/gulp.spritesmith/issues/30
In the interim, you can use gulp.spritesmith@2.5.0
or grunt-spritesmith@3.6.2
.
The breaking changes have been reverted in gulp.spritesmith@2.7.0
and grunt-spritesmith@3.8.0
. Thanks for the bug report!
Thanks @twolfson! It now compiles without error.
The changes have been reintroduced as major releases in gulp.spritesmith@3.0.0
and grunt-spritesmith@4.0.0
.
I have spritesmith configured something like this:
This works as expected and my sprites directory contains a
less
directory containingsprites.less
. However, when I try to compile this file withlessc
on the command line I get the following error:Opening up
less/sprites.less
reveals this (4th line is line 160):Line 160 seems blatantly wrong.
@spriteOne
@spriteTwo
@spriteThree
are never defined anywhere in the file. I opened up the template that was used to generate the Less file part of the spritesheet-templates package (https://github.com/twolfson/spritesheet-templates/blob/master/lib/templates/less.template.mustache) and tried various things to fix the issue but nothing seemed to help. I thought line 36 should have changed from:To:
And while this allows the file to be compiled without error, the variables are not available in the other Less files in my project (the mixins defined in the file are available, so I know the file has been imported).
It seems to me like there is something wrong with the mustache template, but lacking experience with Less I don't know what the issue with it could be.