Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mapbox-gl-style-spec

Package Overview
Dependencies
Maintainers
30
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mapbox-gl-style-spec

a specification for mapbox gl styles

  • 7.4.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
155
increased by86.75%
Maintainers
30
Weekly downloads
 
Created
Source

Mapbox GL Spec & Lint

Build Status Coverage Status

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
  • gl-style-spritify

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 v5). Migrate a style like this:

$ gl-style-migrate bright-v0.json > bright-v5.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

Building Sprites

The gl-style-spritify command can build sprite files for use in GL styles. Generate an image sprite by running this script on one or more directories of images.

The first parameter is the basename that gl-style-spritify will use to generate .json, .png, @2x.json and @2x.png files. For example, if you pass bright, bright.json, bright.png, etc will be generated in the currrent directory.

Subsequent parameters are paths to directories which hold images to be included in the sprite.

$ gl-style-spritify bright sprite-assets

API

Tests

To run tests:

npm install
npm test

To update test fixtures

UPDATE=true npm test

Documentation

Documentation is generated from the JSON reference. To update the docs, run:

$ npm run docs

Keywords

FAQs

Package last updated on 16 Mar 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc