GithubHelp home page GithubHelp logo

yuzhang001 / mapbox-gl-style-spec Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jingsam/mapbox-gl-style-spec

0.0 1.0 0.0 1.74 MB

Mapbox 地图样式规范中文版

Home Page: https://jingsam.github.io/mapbox-gl-style-spec/

License: ISC License

JavaScript 100.00%

mapbox-gl-style-spec's Introduction

Mapbox GL Spec & Lint

Circle CI

GL style spec, validation, and migration scripts for mapbox-gl-js and mapbox-gl-native.

Install

npm install -g mapbox-gl-style-spec

Provides the utilities:

  • gl-style-migrate
  • gl-style-format
  • gl-style-validate

Validation

$ gl-style-validate style.json

Will 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.json

To 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.json

API

Tests

To run tests:

npm install
npm test

To update test fixtures

UPDATE=true npm test

Documentation

  • The utility reference page API.md is generated automatically from inline source documentation.
  • The style reference page exists here: docs/_generate/index.html and can be edited directly.

To view the documentation, run

npm start

and open the served page

open http://127.0.0.1:4000/mapbox-gl-style-spec

mapbox-gl-style-spec's People

Contributors

1ec5 avatar anandthakker avatar andrewharvey avatar ansis avatar bhousel avatar boundsj avatar brunoabinader avatar buchanae avatar edenh avatar friedbunny avatar fuzhenn avatar incanus avatar indus avatar jfirebaugh avatar katydecorah avatar kkaefer avatar lbud avatar lyzidiamond avatar mayagao avatar mourner avatar pdgoodman avatar perrygeo avatar peterqliu avatar samanpwbb avatar scothis avatar tatsvc avatar tmcw avatar tristen avatar willwhite avatar yhahn avatar

Watchers

 avatar

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.