Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Rollup to build browser bundle #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zakjan
Copy link

@zakjan zakjan commented Jul 13, 2020

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant