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.
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 topeerDependencies
, so that the bundle file includes only the few imported internal functions.Thanks to MariTrace for sponsoring this PR!