Skip to content

tempoc/ngclib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ngclib

Derive an Angular library from an Angular CLI project.

Inspiration and much of the source of this library came from this video and its repo.

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.

How to use this?

  1. ng new my-library to create your Angular CLI project.
  2. cd my-library to go to the folder where your CLI project is contained.
  3. npm install --save-dev ngclib to install this command line tool.
  4. node_modules/.bin/ngclib init to generate the files necessary for your library to compile, including the blank library module under src/app/lib/.
  5. npm run ngclib:build to compile your library.

Why use this?

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.