Slide 1

Slide 1 text

Boost your organization's Angular developer experience with custom Nx generators Angular Tiny Conf Shemu 2024

Slide 2

Slide 2 text

Lars Gyrup Brink Nielsen Co-organizer of AarhusJS Co-founder of This is Learning Open-source maintainer Published author GitHub Star Microsoft MVP Nx Champion Angular Hero of Education

Slide 3

Slide 3 text

Workspace overview Nrwl Airlines Boost your organization's Angular developer experience with custom Nx generators

Slide 4

Slide 4 text

Domains Boost your organization's Angular developer experience with custom Nx generators

Slide 5

Slide 5 text

Applications Boost your organization's Angular developer experience with custom Nx generators

Slide 6

Slide 6 text

Library type constraints Boost your organization's Angular developer experience with custom Nx generators

Slide 7

Slide 7 text

Library project structure nrwl-airlines └── libs ├── booking │ ├── data-access │ ├── feature-flight-search │ ├── feature-passenger-info │ └── feature-shell ├── check-in │ ├── data-access │ └── feature-shell ├── seatmap │ ├── data-access │ └── feature-seat-listing └── shared ├── data-access ├── ui-buttons └── util-formatting Nrwl Airlines Boost your organization's Angular developer experience with custom Nx generators

Slide 8

Slide 8 text

Library project configuration { "name": "booking-feature-flight-search", "$schema": "(...)/nx/schemas/project-schema.json", "sourceRoot": "libs/booking/feature-flight-search/src", "prefix": "booking", "projectType": "library", "tags": ["domain:booking", "type:feature"], "targets": { /. (...) } } Nrwl Airlines Boost your organization's Angular developer experience with custom Nx generators

Slide 9

Slide 9 text

Application project structure nrwl-airlines └── apps ├── booking │ ├── booking-desktop │ ├── booking-desktop-e2e │ ├── booking-mobile │ └── booking-mobile-e2e └── check-in ├── check-in-desktop ├── check-in-desktop-e2e ├── check-in-mobile └── check-in-mobile-e2e Nrwl Airlines Boost your organization's Angular developer experience with custom Nx generators

Slide 10

Slide 10 text

Application project configuration { "name": "booking-booking-desktop-app", "$schema": "(...)/nx/schemas/project-schema.json", "projectType": "application", "prefix": "nrwl-airlines", "sourceRoot": "apps/booking/booking-desktop-app/src", "tags": ["domain:booking", "type:app"], "targets": { /. (...) } } Nrwl Airlines Boost your organization's Angular developer experience with custom Nx generators

Slide 11

Slide 11 text

Custom Nx generators Nrwl Airlines Boost your organization's Angular developer experience with custom Nx generators

Slide 12

Slide 12 text

nx g @nrwl-airlines/nx:angular-library flight-search --domain=booking --type=feature Angular library generator Boost your organization's Angular developer experience with custom Nx generators

Slide 13

Slide 13 text

Angular library generator options • Name • Domain • Library type Boost your organization's Angular developer experience with custom Nx generators

Slide 14

Slide 14 text

Angular library generator features • Project and import paths • Project tags • Strict compiler settings • Library type prefix • Domain grouping folder • Unnamed library support • Feature and UI libraries • Sass styles • Standalone component • Selector prefix • OnPush change detection • Display as block element Boost your organization's Angular developer experience with custom Nx generators

Slide 15

Slide 15 text

nx g @nrwl-airlines/nx:angular-application booking-desktop -.domain=booking Angular application generator Boost your organization's Angular developer experience with custom Nx generators

Slide 16

Slide 16 text

Angular application generator options • Name • Domain Boost your organization's Angular developer experience with custom Nx generators

Slide 17

Slide 17 text

Angular application generator features • Project and import paths • Project tags • Strict compiler settings • Domain grouping folder • Standalone components • Sass styles Boost your organization's Angular developer experience with custom Nx generators

Slide 18

Slide 18 text

Demo Custom Nx generators for Nrwl Airlines Boost your organization's Angular developer experience with custom Nx generators

Slide 19

Slide 19 text

Thank you for your attention Boost your organization's Angular developer experience with custom Nx generators