[Angular] Architectures for Huge Angular Based Enterprise

Using Angular CLI v6, we are able to create library or small application inside a Angular CLI generated application.

 

ng new lib-project

cd lib-project

ng g library logger-lib

ng g application playground-app


ng serve --project playground-app

ng build --project logger-lib

 

 

If for example, the lib logger-lib, we only want to use inside our organization or we want to publish to local registry.

 

The library we can use:

sudo npm i -g vardaccio

 

Run:

vardaccio

 

Do the lib build:

ng build --project logger-lib

cd dist/logger-lib

npm publish --registry http://localhost:4873

 

 

posted @ 2018-10-15 00:48  Zhentiw  阅读(142)  评论(0编辑  收藏  举报