mapbox-gl-style-spec
Advanced tools
Comparing version 7.0.2 to 7.4.0
@@ -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 | ||
``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
346446
77
8025
2
80
8
8
3
+ Addedcsscolorparser@~1.0.2
+ Addedglob@~4.0.2
+ Addedjs-beautify@^1.4.2
+ Addedminimist@0.0.8
+ Addedrw@^0.1.4
+ Addedsort-object@^0.3.2
+ Addedspritesmith@0.19.2
+ Added@isaacs/cliui@8.0.2(transitive)
+ Added@one-ini/wasm@0.1.1(transitive)
+ Added@pkgjs/parseargs@0.11.0(transitive)
+ AddedJSV@4.0.2(transitive)
+ Addedabbrev@2.0.0(transitive)
+ Addedansi-regex@5.0.16.1.0(transitive)
+ Addedansi-styles@1.0.04.3.06.2.1(transitive)
+ Addedarray-filter@0.0.1(transitive)
+ Addedarray-map@0.0.1(transitive)
+ Addedarray-reduce@0.0.0(transitive)
+ Addedasync@0.2.10(transitive)
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbase64-js@0.0.2(transitive)
+ Addedbinpacking@0.0.1(transitive)
+ Addedbops@0.0.6(transitive)
+ Addedbrace-expansion@2.0.1(transitive)
+ Addedcanvas@1.1.6(transitive)
+ Addedcanvassmith@0.2.5(transitive)
+ Addedchalk@0.4.0(transitive)
+ Addedcolor-convert@2.0.1(transitive)
+ Addedcolor-name@1.1.4(transitive)
+ Addedcommander@10.0.1(transitive)
+ Addedconcat-stream@1.2.1(transitive)
+ Addedconfig-chain@1.1.13(transitive)
+ Addedcross-spawn@7.0.6(transitive)
+ Addedcsscolorparser@1.0.3(transitive)
+ Addedcwise@0.3.4(transitive)
+ Addedcwise-compiler@0.0.0(transitive)
+ Addedcwise-parser@0.0.1(transitive)
+ Addedeastasianwidth@0.2.0(transitive)
+ Addededitorconfig@1.0.4(transitive)
+ Addedemoji-regex@8.0.09.2.2(transitive)
+ Addedesprima@1.0.4(transitive)
+ Addedforeground-child@3.3.0(transitive)
+ Addedget-pixels@1.0.1(transitive)
+ Addedglob@10.4.54.0.6(transitive)
+ Addedgm@1.4.2(transitive)
+ Addedgmsmith@0.4.5(transitive)
+ Addedgraceful-fs@3.0.12(transitive)
+ Addedhas-color@0.1.7(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedini@1.3.8(transitive)
+ Addediota-array@1.0.0(transitive)
+ Addedis-buffer@1.1.6(transitive)
+ Addedis-fullwidth-code-point@3.0.0(transitive)
+ Addedisexe@2.0.0(transitive)
+ Addedjackspeak@3.4.3(transitive)
+ Addedjs-beautify@1.15.1(transitive)
+ Addedjs-cookie@3.0.5(transitive)
+ Addedjsonify@0.0.1(transitive)
+ Addedjsonlint-lines-primitives@1.6.0(transitive)
+ Addedlayout@2.0.2(transitive)
+ Addedlru-cache@10.4.32.7.3(transitive)
+ Addedminimatch@1.0.09.0.19.0.5(transitive)
+ Addedminimist@0.0.8(transitive)
+ Addedminipass@7.1.2(transitive)
+ Addednan@1.2.0(transitive)
+ Addednatives@1.1.6(transitive)
+ Addedndarray@1.0.19(transitive)
+ Addedndarray-pack@1.0.0(transitive)
+ Addednomnom@1.8.1(transitive)
+ Addednopt@7.2.1(transitive)
+ Addedobj-extend@0.1.0(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedpackage@1.0.1(transitive)
+ Addedpackage-json-from-dist@1.0.1(transitive)
+ Addedpath-key@3.1.1(transitive)
+ Addedpath-scurry@1.11.1(transitive)
+ Addedphantomjssmith@0.4.6(transitive)
+ Addedpngjs@0.4.0(transitive)
+ Addedpngparse@1.1.4(transitive)
+ Addedpngsmith@0.1.5(transitive)
+ Addedppm@0.0.0(transitive)
+ Addedproto-list@1.2.4(transitive)
+ Addedrw@0.1.4(transitive)
+ Addedsave-pixels@0.3.0(transitive)
+ Addedsemver@7.6.3(transitive)
+ Addedshebang-command@2.0.0(transitive)
+ Addedshebang-regex@3.0.0(transitive)
+ Addedshell-quote@1.4.3(transitive)
+ Addedsigmund@1.0.1(transitive)
+ Addedsignal-exit@4.1.0(transitive)
+ Addedsort-asc@0.1.0(transitive)
+ Addedsort-desc@0.1.1(transitive)
+ Addedsort-object@0.3.2(transitive)
+ Addedspritesmith@0.19.2(transitive)
+ Addedstring-width@4.2.35.1.2(transitive)
+ Addedstrip-ansi@0.1.16.0.17.1.0(transitive)
+ Addedtemporary@0.0.50.0.8(transitive)
+ Addedthrough@2.2.72.3.8(transitive)
+ Addedto-utf8@0.0.1(transitive)
+ Addedunderscore@1.6.0(transitive)
+ Addeduniq@0.0.2(transitive)
+ Addedwhich@1.0.92.0.2(transitive)
+ Addedwrap-ansi@7.0.08.1.0(transitive)
+ Addedwrappy@1.0.2(transitive)