Professional Documents
Culture Documents
@ManfredSteyer
@ManfredSteyer
Monorepo
Structure
@ManfredSteyer
Advantages
Everyone uses the latest versions
No version conflicts
@ManfredSteyer
Moving back and forth
Npm Registry
@ManfredSteyer
Two Flavors
Project Monorepo
Company-wide Monorepo
@ManfredSteyer
Creating a Workspace with the CLI
npm install -g @angular/cli
ng new workspace
cd workspace
@ManfredSteyer
Tooling & Generator
https://nrwl.io/nx
@ManfredSteyer
Visualize
Module
Structure
@ManfredSteyer
Creating a Workspace with the CLI
npm install -g @angular/cli
ng new workspace
cd workspace
@ManfredSteyer
Creating a Workspace with Nx
npm install -g @angular/cli
cd workspace
@ManfredSteyer
Creating a Workspace with NX
npm install -g @angular/cli
cd workspace
@ManfredSteyer
DEMO
@ManfredSteyer
@ManfredSteyer
@ManfredSteyer
Tagging Apps and Libs (nx.json)
"booking": {
"tags": ["domain:booking", "type:app"]
},
"booking-feature-search": {
"tags": ["domain:booking", "type:feature"]
},
@ManfredSteyer
Tagging Apps and Libs (nx.json)
"booking": {
"tags": ["domain:booking", "type:app"]
},
"booking-feature-search": {
"tags": ["domain:booking", "type:feature"]
},
@ManfredSteyer
Linting (.eslintrc)
{
"sourceTag": "domain:booking",
"onlyDependOnLibsWithTags":
["domain:booking", "domain:shared"]
}
@ManfredSteyer
DEMO
@ManfredSteyer
@ManfredSteyer
Options
File System
Nx Cloud
Custom Cache
@ManfredSteyer
Configuration (nx.json)
"tasksRunnerOptions": {
"default": {
"runner": "@nrwl/workspace/tasks-runners/default",
[…]
}
},
@ManfredSteyer
Configuration (nx.json)
"tasksRunnerOptions": {
"default": {
"runner": "@nrwl/workspace/tasks-runners/default",
"options": {
"cacheableOperations": ["build", "lint", "test", "e2e"],
[…]
}
}
},
@ManfredSteyer
Using
@ManfredSteyer
Prerequisite for Incremental Builds
@ManfredSteyer
DEMO
@ManfredSteyer
Also Test and Lint-Results Can be Cached
nx build app-or-lib --with-deps
nx lint app-or-lib --with-deps
nx test app-or-lib --with-deps
nx e2e app-or-lib --with-deps
@ManfredSteyer
DEMO
@ManfredSteyer
@ManfredSteyer
Nx Console
for Visual
Studio Code
@ManfredSteyer
•
•
•
•
@ManfredSteyer
@ManfredSteyer
Smart
Comp. Booking Boarding Shared
Dumb Comp.
Feature Feature Feature Feature Feature
UI UI UI UI UI UI UI UI UI
@ManfredSteyer @ManfredSteyer
Booking Boarding Shared
UI UI UI UI UI UI UI UI UI
@ManfredSteyer @ManfredSteyer
Automate
@ManfredSteyer
Usage
@ManfredSteyer
DEMO
@ManfredSteyer
Free eBook
ANGULARarchitects.io/book
@ManfredSteyer
•
•
•
•
@ManfredSteyer
@ManfredSteyer
Slides & Examples
http://softwarearchitekt.at/workshops
d
@ManfredSteyer