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

Use the Angular Package Format #1157

Closed
lazarljubenovic opened this issue Sep 16, 2017 · 10 comments
Closed

Use the Angular Package Format #1157

lazarljubenovic opened this issue Sep 16, 2017 · 10 comments

Comments

@lazarljubenovic
Copy link
Collaborator

There's been some development in publishing libraries since our build system was last time revised. We now have an official document called Angular Package Format (APF), which describes the what and why.

As for how... There's been a lot of discussion everywhere. In the CLI repo, it started here and after more than a year continued here. Here, we have a very informant comment by Rob, which explains problems with packaging and why CLI cannot do it the way we create apps with it.

The important bit in the comment is angular-quickstart-lib repo by Filipe, Angular CLI core member which serves as an APF starter. There's a PR to make the readme of that repo an official Angular guide, but looks like it got stalled for a month now; so I'm not sure where we're at from the standpoint of "this is official and this is how it should be done" by the Angular core team.

There's also an ongoing attempt to create a CLI for creating libraries in APF, called ng-packagr, but it's rather new and not used much yet. So I'd rather use the aforementioned APF boilerplate as a reference point and re-organize the repo.

@sebholstein
Copy link
Owner

@lazarljubenovic 100% agree. I didn't know that there's a doc already. I created this issue #974 a while ago. This would also fix the several Universal issues.

@lazarljubenovic
Copy link
Collaborator Author

Merging such a change would pretty much break all pending PRs because everything would be moved around and renamed, so it might be a good idea to take a few weeks going through some larger PRs first?

@sebholstein
Copy link
Owner

@lazarljubenovic no, this should be independent from the code changes, as we have to change the structure of the package content but not the source code itself.

@nikolasleblanc
Copy link

Hey guys, I wrote this blog post about using ng-packagr to build out a component library using the CLI, https://medium.com/@ngl817/building-an-angular-4-component-library-with-the-angular-cli-and-ng-packagr-53b2ade0701e - having worked on a few component libraries myself in the last year and a half, this is by far the easiest process I've come across. Would recommend you check it out, and if you see holes in the process would very much appreciate feedback. Thanks.

@nasreddineskandrani
Copy link
Contributor

how about this option ?
https://github.com/jvandemo/generator-angular2-library

@lpmusicon
Copy link

Hey, any update on this?

@nasreddineskandrani
Copy link
Contributor

nasreddineskandrani commented Oct 18, 2017

They have a lib part in case it can be usefull for you guys https://blog.nrwl.io/nrwl-nx-an-open-source-toolkit-for-enterprise-angular-applications-38698e94d65
Didn't try it my self yet.

@stale
Copy link

stale bot commented Nov 13, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 13, 2018
@stale stale bot closed this as completed Nov 20, 2018
@maxime1992
Copy link

Not solved. Should probably be re-opened (:thinking: ?)

@lpmusicon
Copy link

@maxime1992 You should probably stick to native google maps script and types. It works and is less hassle with new angular right now.

ghost pushed a commit that referenced this issue Aug 12, 2019
switches build from rollup to ng-packagr

fixes: #1647 #1157
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants