stevage / map-gl-utils

A utility library that makes Mapbox GL JS or Maplibre GL a bit more convenient to work with.
https://npmjs.com/package/map-gl-utils
210 stars 24 forks source link

Possibility to use outside node? #27

Closed animaux closed 3 years ago

animaux commented 3 years ago

Hi Steve,

I was wondering if it was technically possible to build this as frontend extension, like mentioned here: https://stackoverflow.com/questions/62279096/include-js-script-from-a-npm-install

There are some instructions, but the last reply implies there may be some integral problems. However I’m not familiar with node … maybe you could elaborate a bit?

Thanks and all the best!

stevage commented 3 years ago

Thanks, yeah I saw that question. I'm definitely happy to support it, I actually just don't know what is required to produce a build in that format.

animaux commented 3 years ago

Fair enough, thanks! Anyone we could reach out to? Help! :)

stevage commented 3 years ago

Ok, I finally figured this out using Rollup. You can use this URL:

https://unpkg.com/mapbox-gl-utils

Demonstration: https://codepen.io/stevebennett/pen/dyNdGNP

animaux commented 3 years ago

Brilliant, thanks a lot!