Closed keichan34 closed 1 year ago
I like this implementation although I am not really sure this works perfectly in Windows environments ;-)
@hfu Ah, that's a good point. If the name of the file isn't stable between UNIX and Windows operating systems, charites projects won't be able to shared between them. I'll double check what happens on Windows and make fixes as necessary. Thanks!
Just for your information. I tried this on a docker container. This is really wonderful. We can beautifully import JSON style into a series of sub-directory. https://github.com/ubukawa/cmv-test/tree/main/esri/layers
We can have a long name for a style layer. When building a JSON style, I found that there would be an error if we use ">(「折り返し形式のブロックスカラー」)" in the layers where we use "!!inc/file"
I wonder we may need to avoid using ">". This is not directly related to this PR, I will share it at issue.]
Description
Fix #56 by creating directories recursively after joining the layers directory with the layer ID. Before this fix, the layers directory was being created, but if the ID contained a slash, it would try to write the file to an nonexistent directory, resulting in an error.
Type of Pull Request
Verify the followings
main
branchnpm run build
npm run lint
charites help
globallyRefer to CONTRIBUTING.MD for more details.