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 - npm Package Compare versions

Comparing version 7.0.2 to 7.4.0

.eslintrc

4

index.js

@@ -8,1 +8,5 @@ exports.v2 = require('./reference/v2.json');

exports.latest = require('./reference/latest');
exports.format = require('./lib/format');
exports.migrate = require('./lib/migrate');
exports.validate = require('./lib/validate');
{
"name": "mapbox-gl-style-spec",
"version": "7.0.2",
"description": "a specification for mapbox gl styles",
"main": "index.js",
"bin": {},
"scripts": {
"test": "tape ./test.js",
"docs": "cd docs/_generate && npm install && node generate.js"
"version": "7.4.0",
"author": "Mapbox",
"bin": {
"gl-style-migrate": "bin/gl-style-migrate",
"gl-style-validate": "bin/gl-style-validate",
"gl-style-format": "bin/gl-style-format",
"gl-style-spritify": "bin/gl-style-spritify"
},
"license": "ISC",
"dependencies": {
"csscolorparser": "~1.0.2",
"glob": "~4.0.2",
"js-beautify": "^1.4.2",
"jsonlint-lines-primitives": "~1.6.0",
"minimist": "0.0.8",
"rw": "^0.1.4",
"sort-object": "^0.3.2",
"spritesmith": "0.19.2"
},
"devDependencies": {
"coveralls": "~2.10.0",
"coverify": "~1.0.7",
"dox": "^0.6.1",
"doxme": "^1.4.2",
"eslint": "^0.16.2",
"istanbul": "~0.2.11",
"mapbox-gl-styles": "git+https://github.com/mapbox/mapbox-gl-styles.git#mb-pages",
"tape": "^2.12.1"
},
"keywords": [
"mapbox",
"mapbox-gl",
"mapbox-gl-js"
],
"license": "ISC",
"main": "index.js",
"repository": {
"type": "git",
"url": "git@github.com:mapbox/mapbox-gl-style-spec.git"
},
"scripts": {
"cov": "istanbul cover ./node_modules/.bin/tape test/*.js test/migrations/*.js && coveralls < ./coverage/lcov.info",
"doc": "cat lib/*.js lib/*/*.js | dox --raw --skipSingleStar | doxme > API.md && cd docs/_generate && npm install && node generate.js",
"test": "eslint lib/*.js lib/*/*.js migrations/*.js && tape test/*.js test/migrations/*.js"
}
}

@@ -1,25 +0,79 @@

# mapbox-gl-style-spec
# Mapbox GL Spec & Lint
[![Build Status](https://travis-ci.org/mapbox/mapbox-gl-style-spec.svg?branch=master)](https://travis-ci.org/mapbox/mapbox-gl-style-spec)
[![Coverage Status](https://coveralls.io/repos/mapbox/mapbox-gl-style-spec/badge.png)](https://coveralls.io/r/mapbox/mapbox-gl-style-spec)
[Mapbox GL](https://www.mapbox.com/mapbox-gl/) style specification and
reference.
GL style spec, validation, and migration scripts for [mapbox-gl-js](https://github.com/mapbox/mapbox-gl-js) and
[mapbox-gl-native](https://github.com/mapbox/mapbox-gl-native).
This repository contains the [specification](STYLE.md) and reference for
the JSON-based style descriptions used in Mapbox GL, and
is meant to be used as a guideline for building and testing implementations.
### Install
## Reference
npm install -g mapbox-gl-style-spec
The JSON reference to properties and syntax is usable as a module in npm:
Provides the utilities:
npm install --save mapbox-gl-style-spec
* `gl-style-migrate`
* `gl-style-format`
* `gl-style-validate`
* `gl-style-spritify`
The API is a simple object of the reference.
### Validation
```bash
$ 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:
```bash
$ 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:
```bash
$ 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.
```bash
$ gl-style-spritify bright sprite-assets
```
### [API](API.md)
## 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:
```sh
$ npm run docs
```
npm run docs
```
test.js

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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