Skip to content
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

Format style with gl-style-format #59

Merged
merged 2 commits into from
Oct 12, 2019

Conversation

pathmapper
Copy link
Member

Format style with gl-style-format to use standard indentation and sorted object keys for better readability and unification.

Related: openmaptiles/osm-bright-gl-style#24

@orangemug
Copy link
Member

LGTM

Note: You could also get travis to test if the style.json is valid with

diff <(./node_modules/\@mapbox/mapbox-gl-style-spec/bin/gl-style-format style.json) style.json

You'll need to add a package.json with @mapbox/mapbox-gl-style-spec so it's installed.

@pathmapper
Copy link
Member Author

Good idea @orangemug !

We are already using gl-style-validate with travis so I just added
diff <(gl-style-format style.json) style.json
in 791dab5.

Or would it be better to implement it using package.json?

@orangemug
Copy link
Member

Or would it be better to implement it using package.json?

I'm not to worried either way, I'll leave the decision to you

@pathmapper
Copy link
Member Author

Thanks, leaving it like it is for now.

Maybe revisit later and switch to package.json and include contribution guidelines how to test for validity and formatting.

@kylebarron
Copy link
Contributor

diff <(./node_modules/\@mapbox/mapbox-gl-style-spec/bin/gl-style-format style.json) style.json

I believe you should be able to do just

./node_modules/.bin/gl-style-format

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants