0

I want to package the complete Angular 4/6 application along with routing and directives. Though I have tried ng-packagr it's working for single component not the complete app.

Here is the link of ng-packagr:

https://medium.com/@nikolasleblanc/building-an-angular-4-component-library-with-the-angular-cli-and-ng-packagr-53b2ade0701e

If anyone has worked on this or has any idea please do inform. Thanks in advance!

Sharz
  • 81
  • 1
  • 4
  • Package how? Into an executable? My understanding of packagr is for redistributable packages (i.e. modules), not self contained applications. – Phix Sep 05 '18 at 05:28
  • If you are using cli, I think what you need is just `ng bulid --prod=true`. you should be able to find your "package" in dist/ folder – dK- Sep 05 '18 at 05:44
  • Hi @Phix, yes into an executable. Is it possible to make the whole application into executable package? Or is it supposed to be done in separate modules and then imported? – Sharz Sep 05 '18 at 06:04
  • Check out [pkg](https://github.com/zeit/pkg#readme). – Phix Sep 05 '18 at 06:08

1 Answers1

0

We can package it using ng-packagr itself. The mistake I had done was while exporting in index I hadn't passed the main module. Thanks!

Sharz
  • 81
  • 1
  • 4