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 build targets #11

Closed
benmvp opened this issue Mar 2, 2018 · 1 comment
Closed

Add build targets #11

benmvp opened this issue Mar 2, 2018 · 1 comment
Assignees
Milestone

Comments

@benmvp
Copy link
Contributor

benmvp commented Mar 2, 2018

Now that we've got #8 & #10 we should be good to start creating initial build targets for the package. And afterwards we can release an alpha version.

Targets we want are:

  • ESM (ECMAScript modules) at /lib/esm for use in modern bundlers with tree-shaking
  • CommonJS at /lib/cjs for use in Node
  • UMD at /lib/umd for legacy bundlers that read one of AMD, CJS or browser global
  • Browser global at /dist for folks that just want to include a <script> tag

After this (or maybe with it) we can do #2.

Check out react-composite-events for an example of generating the build targets. I spent a lot of time researching and figuring it all out 😄

BenAtEventbrite pushed a commit that referenced this issue Mar 29, 2018
Added Gulp in order to create build targets for ECMAScript modules (ESM), CommonJS (cjs), Universal Modules (UMD), and dist bundles. This should hopefully be the final step before actually doing an inaugural release.

* ESM - used by modern dependency systems like Webpack or Rollup that can do tree-shaking optimizations
* CJS - used primarily by Node for resolving dependencies
* Dist bundle - used by legacy dependency systems like requireJS
* UMD - Can't think of a good use case where you'd use UMD over the previous 3, but adding it for now for completeness. May get removed in later releases

Was having issues with `lodash` including everything just for `isPlainObject` so I rewrote the code to no longer need it. In the future if we do need `lodash` we should use [`lodash-es`](https://www.npmjs.com/package/lodash-es) (lodash exported as ES modules).

Also changing the package name to be just `eventbrite` instead of `brite-rest`.

Fixes #11
@BenAtEventbrite BenAtEventbrite added this to the Alpha milestone Apr 5, 2018
@ebtravis
Copy link
Collaborator

🎉 This issue has been resolved in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

No branches or pull requests

3 participants