Workspace - Specific Schematics
Nx helps promote best practices.
Some of the them are well-established in the Angular community. For instance, most non-trivial Angular projects use NgRx, so Nx comes with a set of built-in code generators and runtime libraries to make sure your applications’ state management is consistent. Just run
ng g ngrx accounts --module=one/two/app.module.ts to set everything up.
Some, however, are specific to your organization. But Nx can help with those as well. Say, for example, we want to promote a pattern of encapsulating NgRx-related code into data-access libraries. This is how easy it is to do it with Nx:
Start by generating a new workspace schematic.
Then, provide the implementation.
Finally, invoke it to generate a new data-access lib.