Make Nx Work for You with Custom Generators
summary
Demonstrates writing local Nx plugins (since 13.10) that extend the Angular library generator using the Nx DevKit and AST to automate real tasks: set importPath, enforce three tag enums (scope/domain/type), generate four libraries at once (data-access, ui, feature, utils), add a custom test-setup for Angular Testing Library, and update CODEOWNERS. Generators include unit and e2e tests, can be published, and successfully produce nested directories, correct tags, and working test scaffolding.
AI-written summary · about
chapters (13)
- 0:00Introduction to NX
- 1:30Why use generators
- 3:35Enforcing standards
- 5:44Benefits of generators
- 7:42Getting started
- 9:14Generator structure
- 12:27Extending existing plugins
- 14:14Automating configurations
- 15:46Enforcing architecture
- 18:08Advanced generation
- 19:18Customizing file edits
- 21:19Custom test setup
- 23:48Conclusion and takeaways
related talks
22mFine-Tuning Your Angular Workflow with Nx: Beyond the CLI
24mNX Generators or how to skip boring tasks
09mUsing Nx: Angular CLI Power-ups for Modern Development
26mNx for Angular Developers
29mSupercharging the Angular CLI with Nx
36mHow to scale up your angular projects like a pro
21mProgressively enhance your DX with Nx
20mWhat and Why nx 20 reasons in 20 minutes
