0.0.2 • Published 6 months ago
@trailstash/style-json-to-js v0.0.2
MapLibre style.json
to JavaScript
This package converts a style.json
for MapLibre into a JavaScript package
to make it easier to work on. This is inspired by the prcedent set by OSM
Americana for authoring MapLibre styles using JavaScript.
Usage
npx @trailstash/style-json-to-js your-style.json
This creates an NPM package named your-style
which contains a build script to build the
style.json
, or you can import the style
function from style.js
.
Layer grouping
This package groups layers into separate files similarly to
Maputnik groups adjacent layers. Namely, it groups layers with the
same prefix (delimited by _
or -
).