mapbox-gl-style-spec v8.11.0
Mapbox GL Spec & Lint
GL style spec, validation, and migration scripts for mapbox-gl-js and mapbox-gl-native.
Install
npm install -g mapbox-gl-style-specProvides the utilities:
gl-style-migrategl-style-formatgl-style-validate
Validation
$ gl-style-validate style.jsonWill validate the given style JSON and print errors to stdout. Provide a
--json flag to get JSON output.
Migrations
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.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.jsonAPI
Tests
To run tests:
npm install
npm testTo update test fixtures
UPDATE=true npm testDocumentation
- The utility reference page API.md is generated automatically from inline source documentation.
- The style reference page exists here:
docs/_generate/index.htmland can be edited directly.
To view the documentation, run
npm startand open the served page
open http://127.0.0.1:4000/mapbox-gl-style-spec9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago