Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
mapbox-gl-style-spec
Advanced tools
GL style spec, validation, and migration scripts for mapbox-gl-js and mapbox-gl-native.
npm install -g mapbox-gl-style-spec
Provides the utilities:
gl-style-migrate
gl-style-format
gl-style-validate
gl-style-spritify
$ 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 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
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
To run tests:
npm install
npm test
To update test fixtures
UPDATE=true npm test
Documentation is generated from the JSON reference. To update the docs, run:
$ npm run docs
FAQs
a specification for mapbox gl styles
The npm package mapbox-gl-style-spec receives a total of 69 weekly downloads. As such, mapbox-gl-style-spec popularity was classified as not popular.
We found that mapbox-gl-style-spec demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 50 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.