Skip to content
New issue

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

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

Already on GitHub? # to your account

Allow maki to be used from browsers #462 #556

Merged
merged 5 commits into from
Sep 7, 2021
Merged

Allow maki to be used from browsers #462 #556

merged 5 commits into from
Sep 7, 2021

Conversation

mbullington
Copy link
Contributor

Adds another build script node scripts/make-browser.js that makes a browser.js in the root that you can use in Browserify/Webpack/ESBuild/whatever!.

The trick here is that everything in our @mapbox/maki export is JSON serializable, so the script basically does:

module.exports = JSON.stringify(maki)

Copy link
Member

@tristen tristen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@mbullington mbullington merged commit 29e8be3 into main Sep 7, 2021
@mbullington mbullington deleted the browser-field branch September 7, 2021 17:47
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants