Package Exports
- @trailstash/style-json-to-js
- @trailstash/style-json-to-js/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@trailstash/style-json-to-js) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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 -
).