bootsoon / ng-circle-progress

A simple circle progress component created for Angular based on SVG Graphics.
https://bootsoon.github.io/ng-circle-progress/
MIT License
250 stars 85 forks source link

build: bundle the library in angular package format #76

Closed mattlewis92 closed 5 years ago

mattlewis92 commented 5 years ago

I was trying out our app with the new ivy compiler and this package wasn't working with it because it wasn't in the angular package format, this refactors all the build process to use ng-packagr which nicely takes care of all the hard work. Thanks for your work on this library! 😄

Note: After this change you will need to run npm publish dist to publish new versions, as everything will get built into the dist folder instead.

mattlewis92 commented 5 years ago

@bootsoon I synced with master so this should be good to go now, let me know if you'd like me to change anything! 😄

bootsoon commented 5 years ago

Thanks. I'm not familiar with ng-packagr so not sure about this merge.

mattlewis92 commented 5 years ago

Happy to explain more! ng-packagr takes care of bundling packages into all the formats described by the angular package format: https://docs.google.com/document/d/1CZC2rcpxffTDfRDs6p1cfbmKNLA6x5O-NtkJglDaBVs/preview#heading=h.k0mh3o8u5hx

It provides a UMD bundle, ES modules with both ES5 and ES6 as well as several other formats (it's the same format that angular itself is bundled in well as any libraries created with the angular cli). By using ng-packagr and being in the common format angular libraries are created in it improves compatibility with the angular eco system so things like the new ivy compiler just work and don't require changes.

It shouldn't be a breaking change to your library and actually improves things by removing the need for a lot of build tooling.

If you need any more info please don't hesitate to ask 😄

Ezard commented 5 years ago

@bootsoon have you thought about this any more please?

As for the credibility of ng-packagr, it's very widely used, as I believe most Angular libraries use it these days 🙂