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

Publish kepler.gl to cdn as UMD package #332

Closed
heshan0131 opened this issue Jan 16, 2019 · 3 comments
Closed

Publish kepler.gl to cdn as UMD package #332

heshan0131 opened this issue Jan 16, 2019 · 3 comments
Assignees
Labels
chore Changes to the build process or auxiliary tools and libraries such as documentation generation rfc roadmap item Item that's on our current roadmap

Comments

@heshan0131
Copy link
Contributor

heshan0131 commented Jan 16, 2019

Feature
Add build script to create a umd bundle

Solution

  1. Create build script to build the umd bundle, unpkg will automatically publish it.
    UNPGK instruction
    • Add the umd (or dist) directory to your .gitignore file
    • Add the umd directory to your files array inpackage.json
    • Use a build script to generate your UMD build in the umd directory when you publish

Example: deck.gl webpack.config
Example: deck.gl build.sh

  1. Exclude deck.gl, react, mapbox.gl in the bundle

Alternative
Using rollup to build for better tree shaking. However will add to dev dependencids
Example: Provide umd bundle

@heshan0131 heshan0131 added roadmap item Item that's on our current roadmap rfc labels Jan 16, 2019
@heshan0131 heshan0131 added this to the Milestone (Jan 14, 2019) milestone Jan 16, 2019
@heshan0131 heshan0131 added the chore Changes to the build process or auxiliary tools and libraries such as documentation generation label Jan 16, 2019
@macrigiuseppe
Copy link
Collaborator

I also found a different option:

  • Babel babel-plugin-transform-es2015-modules-umd

Since we already build the library using babel, we can reuse our current work

@macrigiuseppe macrigiuseppe changed the title Publish kepler.gl to cdn Publish kepler.gl to cdn as UMD package Jan 28, 2019
@macrigiuseppe
Copy link
Collaborator

We picked the first option: Webpack

@macrigiuseppe
Copy link
Collaborator

Completed and merged onto master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Changes to the build process or auxiliary tools and libraries such as documentation generation rfc roadmap item Item that's on our current roadmap
Projects
None yet
Development

No branches or pull requests

2 participants