Coder Social home page Coder Social logo

Comments (4)

pathmapper avatar pathmapper commented on August 17, 2024

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.

kylebarron avatar kylebarron commented on August 17, 2024

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.

pathmapper avatar pathmapper commented on August 17, 2024

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.

pathmapper avatar pathmapper commented on August 17, 2024

ref: #59 (comment)

from osm-liberty.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.