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

Package distribution as UMD #43

Merged
merged 8 commits into from
Mar 30, 2020
Merged

Package distribution as UMD #43

merged 8 commits into from
Mar 30, 2020

Conversation

labkey-nicka
Copy link
Contributor

Rationale

Universal Module Definitions (UMD) are modules which are capable of working everywhere, be it in the client, on the server or elsewhere.
https://github.com/umdjs/umd

This PR changes package distribution for @labkey/api to use UMD. The package can now fully be built with webpack so I've removed rollup and it's configuration.

Changes

  • Use webpack to build a UMD module distribution. Same pattern as is used by @labkey/components.
  • Compile source maps from TypeScript.
  • Remove rollup build configuration.
  • Simplify jest configuration in package.json.
  • Package updates. Fixes 39329.
  • Nit: Removed console warning about jQuery. This is overly noisy and not helpful when it needs to be. Elected for a runtime error upon usage of loadDOMContext().$ instead. Added test.

Copy link
Contributor

@labkey-susanh labkey-susanh left a comment

Choose a reason for hiding this comment

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

Just a copy-paste update suggestion.


optimization: {
// don't minimize the code from components, module/app usages will be doing that if they want to
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// don't minimize the code from components, module/app usages will be doing that if they want to
// don't minimize; module/app usages will be doing that if they want to

@labkey-nicka labkey-nicka merged commit a72323f into master Mar 30, 2020
@labkey-nicka labkey-nicka deleted the fb_umd_no_rollup branch March 30, 2020 16:08
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.

3 participants