Comments (4)
Thanks for your suggestion @kylebarron
In general I'm up for adding a package.json
with @mapbox/mapbox-gl-style-spec
as dev dependency to have gl-style-format
available.
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. npm run test
to format/validate the style?
Later we could also add functionality to remove not needed default values which are bloating the style like "visibility": "visible"
as this is a recurring request to remove them from PRs (see #61, #72 (comment), #71 (review)).
from osm-liberty.
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.
from osm-liberty.
OK thanks, so let's implement this with a npm run ...
script which could be executed at any time.
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?
from osm-liberty.
ref: #59 (comment)
from osm-liberty.
Related Issues (20)
- One way arrow isn't very clear
- Style also POI subclass? HOT 2
- Styling for other point features besides POI
- Use only size 15 icons HOT 1
- More icons for POI subclass HOT 1
- Error reading style file HOT 5
- Change openmaptiles source from v3 to v3-openmaptiles
- Maptiler key broken HOT 2
- Vector natural earth tiles? HOT 5
- Wetlands styling HOT 8
- Script to catch unnecessary style elements HOT 8
- One way roads HOT 1
- Highway shields HOT 3
- Host fonts in repository HOT 8
- Self hosted offline HOT 5
- Minor roads are over tertiaries HOT 2
- Pitch and tracks are not rendered
- Add rendering for place=quarter HOT 3
- Add building names HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from osm-liberty.