[Feature] Generators Local Aliases / Generator Priorities #22934
Char2sGu
started this conversation in
Feature Requests
Replies: 1 comment 4 replies
-
The Nx generators do have aliases defined, for example So |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am migrating from Angular CLI to NX. Things are mostly satisfying, except for being required to write the verbose
collection:generator
syntax for almost every code generations.Scaffolding components, directives, and pipes are the most frequent operations within my workflow. With Angular CLI, I was able to write
ng --project foo g c bar
for a generation, while with Nx I have to usenx --project foo g @schematics/angular:c bar
for the same operation.I was wondering if it would be a good idea to allow the developer to define local aliases for Nx Generators / Angular Schematics in
nx.json
. The syntax might be something like:nx.json
By doing so,
nx g c
is equivalent tonx g @schematics/angular:component
.Alternatively, allow the developer to specify plugin priorities:
nx.json
By doing so, for any generator names that do not have a collection explicitly specified, Nx will go through the list of plugins specified in
pluginPriorities
and use the first generator that matches.Beta Was this translation helpful? Give feedback.
All reactions