unvt / charites

It is an application to style vector tiles easily
https://unvt.github.io/charites/
MIT License
54 stars 13 forks source link

No documentation on --sprite functionality in documentation #115

Open pnorman opened 2 years ago

pnorman commented 2 years ago

Describe the bug

charites build --help has three parameters related to sprites, --sprite-url, --sprite-input, --sprite-output which hint that there's icon building functionality with charites.

There is nothing in the documentation about how to use this functionality

Expected behavior How to build sprites with charites is documented

Charites Version:

champierre commented 1 year ago

@pnorman There is an explanation of these options in https://unvt.github.io/charites/usage/commandline_interface.html, and a sample of usage in https://unvt.github.io/charites/usage/examples.html. I know the current documentation is not enough yet, so could you clarify what information you want to know more about?

pnorman commented 1 year ago

-i and -o imply that charites can build sprites, but I can't figure out how this works. Where do the spritesheets get saved. How can we use serve with sprites built from charites?

keichan34 commented 1 year ago

I agree that this feature needs more documentation.

The current way this works now is you pass a directory to -i, that is full of SVG files you want to be compiled to a sprite sheet. You can use maki icons if you like, but any SVG file should work (only SVG is supported now -- I want to add PNG support as well in the future: unvt/sprite-one#17). The generated spritesheets ( [name].png/json and [name]@2x.png/json ) are output in the directory specified by -o. However, the way [name] is calculated from the sprite field of the input yml file is not documented.

I think this should probably be documented using its own page, in addition with an update to build example

Additionally, sprites doesn't work with serve right now, I've added an issue for this.