iamanvesh / mapbox-gl-draw-circle

Supports drawing/editing a circle on a Mapbox map.
https://iamanvesh.github.io/mapbox-gl-draw-circle-test/
MIT License
74 stars 59 forks source link

Add Rollup to build browser bundle #25

Open zakjan opened 4 years ago

zakjan commented 4 years ago

Mapbox-gl and mapbox-gl-draw have a build script, which produces a standalone browser bundle file to be used in environments without npm and/or bundler. However, it is missing in this library.

This PR adds a build script with Rollup, and calls it in prepublishOnly npm script, so that the bundle files are automatically accessible over unpkg.com or similar CDNs. @mapbox/mapbox-gl-draw dependency is moved to peerDependencies, so that the bundle file includes only the few imported internal functions.


Thanks to MariTrace for sponsoring this PR!