gulp-spritesmith icon indicating copy to clipboard operation
gulp-spritesmith copied to clipboard

path.relative doesn't work as expected

Open colynb opened this issue 11 years ago • 1 comments

When passing file paths to path.relative it generates a path that I wouldn't expect. Better to use just the dirname of the file instead.

If I have a generated folder:

dist
 -- img
   -- sprite.png
 -- css
   -- sprite.css

I would expect the image path to be ../img/sprite.png and not ../../img/sprite.png which is what is happening now.

colynb avatar Feb 13 '14 19:02 colynb

Hi. I`ve refactored plugin, so now it more fits gulp style. Please, check if it works for you ok in version 0.0.2.

Otouto avatar Feb 17 '14 09:02 Otouto