This is a
playground to test code. It runs a full
Node.js environment and already has all of
npm’s 1,000,000+ packages pre-installed, including
mapbox-gl-style-spec with all
npm packages installed. Try it out:
This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.
npm install -g mapbox-gl-style-spec
Provides the utilities:
$ gl-style-validate style.json
Will validate the given style JSON and print errors to stdout. Provide a
--json flag to get JSON output.
This repo contains scripts for migrating GL styles of any version to the latest version (currently v8). Migrate a style like this:
$ gl-style-migrate bright-v7.json > bright-v8.json
To migrate a file in place, you can use the
sponge utility from the
$ brew install moreutils $ gl-style-migrate bright.json | sponge bright.json
To run tests:
npm install npm test
To update test fixtures
UPDATE=true npm test
docs/_generate/index.htmland can be edited directly.
To view the documentation, run
and open the served page