-
Notifications
You must be signed in to change notification settings - Fork 22
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
Group Issue: refactoring #10
Comments
Thanks @shlomiassaf !
|
@NathanWalker I'm talking about a demo app that consumes a lib. See https://github.com/shlomiassaf/angular2-modal/tree/master/src |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To provide an easy to use, productive and dev friendly seed here are some suggested refactoring.
Each suggestion has an issue attached, this issue is used for managing the issues:
Move to Webpack 2 (Move to Webpack 2 #6)
Add DEMO application (Add demo application parallel to lib #9)
Support AoT friendly package (Support AoT compilation #8)
Output a UMD bundle (Output UMD bundle #7)
Distributed package structure
The end result of the package should contain 2 versions of the package
The ES5 version will be used when importing the package, this is done by setting
in package.json
The ES6 version is a modular option that a developer need to opt-in to use, however it also plays a part in the ES5 UMD bundle.
When developing, user will usually:
The UMD bundle is used, it has no type information but the ES6 version does. The ES6 version comes with
d.ts
files and they are referenced inside package.jsonThe ES6 version also hold
*.metadata.json
files so it provides support for AoT compilation.Since
main
property references the UMD bundle we use themodule
property to make sure ES6 module syntax code get the modular ES6 version and not the UMD bundle (so AoT can work)The text was updated successfully, but these errors were encountered: