twolfson/spritesmith

Update canvassmith

Opened this issue · 8 comments

This fails on OSX due to Canvas 1.1.6 being used, care to update the package requirements to the latest canvassmith?

canvassmith is only used in devDependencies, it shouldn't affect using spritesmith as a library. Are you trying to do development on spritesmith?

Yes sir, only using it in devDependencies. Technically i am using

https://github.com/gobwas/gulp-sprite-generator

in devDependencies, but it depends on spritesmith, which against depends on canvassmith that again depends on canvas :/

That repo is depending on a very old version of spritesmith:

https://github.com/gobwas/gulp-sprite-generator/blob/3b903fd6df84e5d582017b329aededf78ea7d6f2/package.json#L38

Their version is ^0.18.0 (which is all 0.x.x versions) and our latest version is 3.11.1. We don't support version outside of our latest one. As a result, I'm closing this issue

Is there any reason you can't use gulp.spritesmith?

I tried gulp.spritesmith before ending up with this one, that was over a year ago and i can't remember the exact details, but gulp-sprite-generator was the only one i could get working properly.

gulp-sprite-generator is horrible and awesome at the same time. Would love to get away from it, it gives a headache not only on my Mac, but Linux as well (Even tho it works there, with a lot of warnings and errors).

I'm happy to help out with any issues on gulp.spritesmith/spritesmith but gulp-sprite-generator is out of my scope

Ahh, looking at the lib. again now then it's because spritesmith takes the images from a folder, while the library i'm using today takes the images directly from the CSS background-image property and create a sprite based on that + copy the CSS class entirely and replace the background property with the new sprite.

Ah, I've seen some libraries in PostCSS which do that. Here's one that seems robust:

https://github.com/glebmachine/postcss-easysprites

Oh wow, that looks excellent! Thank you so much for the link.