-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add script to format and validate the style #73
Comments
Thanks for your suggestion @kylebarron In general I'm up for adding a If we would use a Git pre-commit hook, than the style would only be formatted when doining a commit, right? I think it would be useful to be able to format/validate the style any time while working on it. What do you think about using a script instead which could be execute with e.g. Later we could also add functionality to remove not needed default values which are bloating the style like |
Correct, the style would only be formatted on commit. I agree that format/validation at any time is good, however most of the time people will be making edits using Maputnik, which probably enforces a valid style, and with the online editor forces formatting correctly. I mostly see this as a workaround/second check while the Maputnik issue is being sorted out. |
OK thanks, so let's implement this with a Yeah, this is a good workaround for people using Maputnik Desktop, but also generally useful (e.g. when modifying the style with a text editor). Is this something you are interested to work on and submit a PR? |
ref: #59 (comment) |
As a possible workaround to the JSON formatting issues mentioned in #66 and maplibre/maputnik#591, it might be easiest to just add
gl-style-format
in place as a Git pre-commit hook. It should be as simple as adding an NPMpackage.json
with a couple dev dependencies, e.g. nst-guide@75b0657#diff-b9cfc7f2cdf78a7f4b91a753d10865a2R24-R32(for now, that only validates, not formats in place)
Before writing up a PR, just wanted to check if this is of interest.
The text was updated successfully, but these errors were encountered: