selaux / node-sprite-generator

Generates image sprites and their spritesheets (css, stylus, sass or less) from sets of images. Supports retina sprites. Provides express middleware and grunt task.
MIT License
192 stars 39 forks source link

Add export to javascript #53

Closed siemiatj closed 7 years ago

siemiatj commented 7 years ago

I thought it'd be cool to have an option of exporting stylesheet to a javascript object. Useful if you're working with HTML5 canvas.

selaux commented 7 years ago

Does it make sense to export the image data itself as well? E.g. base64 encoded?

siemiatj commented 7 years ago

I think the use cases are marginal.

selaux commented 7 years ago

So, I would accept when code style is fixed...

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.03%) to 95.703% when pulling 03cebec21492bdd8e31efe0efcfee44220d861fa on siemiatj:master into 018a65d8f9b2da410a160eb0d53bf1244c42953d on selaux:master.

siemiatj commented 7 years ago

I have some tests failing that shouldn't be failing as I haven't touched the internals. I think it might be because I'm using the latest cairo, gm and canvas.

screen shot 2017-02-22 at 1 54 12 am