unvt / charites

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

[bug] `-i` and `-o` options should be just a optional parameters #173

Closed JinIgarashi closed 10 months ago

JinIgarashi commented 1 year ago

Describe the bug

I am not sure this bug is present since which vercion was released. Probably after introducing sprite-one by @smellman because it is related to sprite options.

Currently, using -i and -o options (see the below doc) for sprite icons are essential when use charites to build style. If these two parameters are missing, charites stop building style.

https://unvt.github.io/charites/usage/commandline_interface.html#build-style-json-from-style-yml

But, in some cases, there can be a style which does not use any sprite icons. These options should be just a optional parameters.

To Reproduce

Build style file without -i and -o options like

charites build charites/style-unvt.yml docs/unvt/style.json

It shows the error of Expected valid width, height and channels to create a new input image.

If I create dummy icons and sprite folder to execute the following commands, it can convert yaml to json, but I have to clean up dummy sprite folders after building

charites build charites/style-unvt.yml docs/unvt/style.json -i icons -o ./sprite"

Expected behavior

Minimum require parameters for building should be only input yaml and output json path. No -i and -o are required for building file.

Screenshots If applicable, add screenshots to help explain your problem.

Charites Version:

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

JinIgarashi commented 10 months ago

@smellman let me close this issue. It looks working with the latest sprite-one 0.1.1