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 support for UMD and es2015 bundles #373

Merged
merged 2 commits into from Jun 22, 2018

Conversation

dlabrecq
Copy link
Member

@dlabrecq dlabrecq commented Jun 5, 2018

This is a work in progress, but I've added support for UMD and es2015 bundles. Needs further testing with a SystemJS based application.

Fixes: #366

@dlabrecq
Copy link
Member Author

dlabrecq commented Jun 7, 2018

Modified a SystemJS based application (using Stan's 'Tour of Heros' app) for testing. The changes for this example can be seen here:
https://github.com/dlabrecq/angular-tour-of-heroes/pull/1/files

Omitted dependencies from UMD and es2015 bundles (e.g., c3, d3, ngx-bootstrap, ngx-datatable, etc.), which allows the application to install different versions.

Unlike ES6 modules, the test application required all dependencies to be installed. It's not clear if that's something that can be changed with the example application?

@dlabrecq
Copy link
Member Author

dlabrecq commented Jun 7, 2018

FYI @ssilvert

@dlabrecq
Copy link
Member Author

dlabrecq commented Jun 8, 2018

I was able to omit unused dependencies by mapping c3, angular-tree-component, etc. to '@empty', for example. The example app has been updated here: https://github.com/dlabrecq/angular-tour-of-heroes/pull/1/files

Copy link
Contributor

@seanforyou23 seanforyou23 left a comment

Choose a reason for hiding this comment

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

Works for me, tried using a SystemJS app as well as an app running angular + angular cli, was able to consume the entire patternfly-ng library, or individual pfng modules without issue.

LGTM - nice work!

@dlabrecq dlabrecq force-pushed the master branch 2 times, most recently from 6d9f1f7 to 596afce Compare June 17, 2018 14:49
@dlabrecq
Copy link
Member Author

Per @ssilvert 's suggestion, I've removed the babel plugin from the example application and everything worked as expected. Unless there are any further comments, I'll merge shortly?

@ssilvert
Copy link

Sounds great, Dan. Please let me know when there is a build I can try out.

@dlabrecq dlabrecq merged commit d7e5f59 into patternfly:master Jun 22, 2018
@dlabrecq dlabrecq changed the title WIP: Add support for UMD and es2015 bundles Add support for UMD and es2015 bundles Jun 22, 2018
@dlabrecq dlabrecq deleted the umd-bundle branch June 25, 2018 17:17
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.

None yet

3 participants