Learn how to create, publish and use your own custom Angular Schematics to increase your productivity and enhance developer experience with step by step guide and examples from practice!
I got very excited when Angular CLI team announced that they are working on Schematics.
Automatic generation and updating of a code base in organized well defined manner sounds like a lot less tedious work for the developersLots of stuff is possible with the help of schematics already. From official initiatives like being able to ng update your project dependencies and ng generate stuff like components or pipes, through semi official (ex Angular team) stuff like nx with schematics for generating services for popular ngrx state management library to small custom one-off schematics which are starting to pop up on npm.
Possible use-cases and benefits of Angular SchematicsSchematics have a huge advantage compared to more traditional approach to dealing with typing heavy tasks like using IDE templates or macros in that they are easily distributed and semantically versioned.
Schematics can also be used to easily introduce and enforce project wide conventions. This can in turn greatly reduce ramp up time for new developers joining ongoing projects.
Instead of trying to decipher outdated documentation they could just generate project specific stuff like entire app skeletons with environment specific configurations or whole feature skeletons with backend integrations and dummy screens.
Then they can focus on what really matters — implementing real features for the end users!
What we will learnwhat are schematics and collectionshow to create new schematics collectionsimplest way to implement new custom schematichow to test our new schematic with real local…