Open Pandawan opened 5 years ago
This one is a tough question I have been thinking since the introduction of schematics in ng
CLI, but I haven't made my mind yet on what we should do in this regard.
Some thoughts for discussion:
Schematics are made to do exactly that, but:
On the other hand, Yeoman is nice & easy for bootstrapping project, but not really for updates or individual, target changes. It's not perfect, but has been proven to be at least manageable until now.
Mixing schematics & the actual Yeoman approach would be the dream combo: Yeoman for orchestration and base app bootstrapping + targeted schematics for some parts (tools, auth, features etc), but:
As for me, I don't have the bandwidth to undertake a change this significant in the architecture of this tool, but if anyone wants to take a look at this (even in a POC branch) I'm not against it. Just integrating an existing schematic from the community into the "regular" generator process could be a nice first step.
@bursauxa @creal73 any thougths?
I'm submitting a...
Current behavior
Right now, after having created a project, there is no way to automatically add a tool/addon (i.e. prettier). You have to manually go through and install the package, set it up. You can, of course, create a new project and see all the files that reference that specific package, but that is tedious/complicated and could be made much more efficient/simple.
Expected behavior
Similar to the update method asking you which files you want to update and which tools/addons you want to install, there should be a CLI command (i.e.
ngx add <name>
) which would run the tool/addon-generation part of the update command, and similarly ask you which files you want to override/merge, etc.Although you might sometime need to setup other things manually, having this as a starting base would be very helpful.