GL style spec and migration scripts for mapbox-gl-js and mapbox-gl-native.
npm install -g mapbox-gl-style-lint
Provides the utilities:
gl-style-migrategl-style-validate
$ gl-style-validate style.jsonWill 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 v5). Migrate a style like this:
$ gl-style-migrate bright-v0.json > bright-v5.jsonTo migrate a file in place, you can use the sponge utility from the moreutils package:
$ brew install moreutils
$ gl-style-migrate bright.json | sponge bright.jsonTo run tests:
npm install
npm test
To update test fixtures
UPDATE=true npm test
