Why Nx?
- an extention of the Angular CLI
- allow multiple Angular applications in one app (easily share code among multiple applications)
- encourage code sharing
- encourage to architect your app properly
Multiple repos vs monorepo
- enterprise large apps
- consistency
- formalize a community approach
- robust and proven patterns
Steps:
install Angular CLI
1
npm install -g @angular/cli
install Nx
1
npm install -g @nrwl/schematics
create new Nx workspace
1
create-nx-workspace <name>
Now you have a new workspace
- apps (where the application lives)
- libs (reusable chunks of functionality)
- tools (things to manage your workspace)