Support for sprites in the serve command
keichan34 opened this issue · comments
Is your feature request related to a problem? Please describe.
charites build
can build sprites, but charites serve
cannot serve them.
Describe the solution you'd like
charites serve
should serve sprites the same way the build command can create them. charites serve
should reload the sprites when they've been updated, the same way the style updates (this may need some custom mapboxgl/maplibregl work)
Describe alternatives you've considered
Now, the only real alternative is to have them hosted on another server, which really isn't a good alternative. Sometimes I find myself running build and then using python -m http.server
or something like that.
Additional context
The sprites feature needs more documentation (#115) and probably should be thought about in terms of consistency and what a feature-complete sprites feature integrated with charites would look and feel like. For example, I could bolt on sprite serving support for serve
, but because build
only accepts the -i
and -o
arguments for spritesheet generation, serve
would need to rely on those options as well. Ideally, these options would be set in the main style.yml
or some kind of other file like sprites.yml
(there has been some discussion about this in #47 and #36 (comment))