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