I have an Angular library hosted in a git repository but not published to npm. The library is packaged with ng-packagr. Is it possible to import it as a git dependency in another project?
Simply specifying the git URL as a npm dependency does not work, because ng-packagr builds the Angular library into the dist
folder and that folder is usually published to npm. You can specify a postinstall
script, but how can you configure afterwards that the root folder of the library is actually in the dist
folder?
I don't want to publish to npm because the application is not open source. I could use a private npm repository, but I was thinking if I can avoid all the hassle.
What I did was actually to specify this as a git dependency, add a postinstall script and when importing I was importing library/dist
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With