unvt / charites

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

Fix/serve command options #63

Closed JinIgarashi closed 2 years ago

JinIgarashi commented 2 years ago

@naogify fixed #58 now. I have shift both of parameters from global to specific server command options because provider and mapbox-access-token options are not used in other commands rather than serve.

I don't think both of them are required for init, convert and build commands.

The below is new usage of serve command.

charites serve -h
Usage: charites serve [options] <source>
serve your map locally
Options:
  --provider [provider]                      your map service. e.g. `mapbox`, `geolonia`
  --mapbox-access-token [mapboxAccessToken]  Access Token for the Mapbox
  -h, --help 

In addition, I have added all subcommands usage on README.md.

JinIgarashi commented 2 years ago

@naogify Could you just merge this PR if serve command works well with optional parameters? The aim of this PR is fixing bug raised by issue #58. Unfortunately, as you know, existing source code of serve command is not sufficient to write unit test. It may be required to change and refactor significantly in order to make test cases. It may take time to implement tests.

I have already created another issue #62 for unit test. I would like to implement unit tests for serve command together with refactoring in another PR. Does it make sense?

JinIgarashi commented 2 years ago

@naogify I noticed --provider option is also used in build command. Added CLI option for build and updated README.md

naogify commented 2 years ago

@JinIgarashi Thank you! Sorry for late reply. I will take a time to check it later!