Derive an Angular library from an Angular CLI project.
With any luck the Angular team is close to producing a CLI solution to the creation of Angular libraries that will make this tool obsolete.
ng new my-libraryto create your Angular CLI project.
cd my-libraryto go to the folder where your CLI project is contained.
npm install --save-dev ngclibto install this command line tool.
node_modules/.bin/ngclib initto generate the files necessary for your library to compile, including the blank library module under
npm run ngclib:buildto compile your library.
Because your teams are probably already using Angular CLI to create apps and now they want to share code.
There's no need to come up with a new setup for libraries. Run this and develop your libraries as you would your apps. Use the same
ng commands to generate, run, test, lint, and build your project.