You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Pandawan
changed the title
Add addons after generation through CLI
Add addons/tools after generation through CLI
Sep 11, 2019
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:
are more complex to maintain
are more suited for small, targeted changes: it would mean that we would need to convert each choice of the generator into a separate schematic. While more flexible, I'm afraid that this would become a nightmare to test and maintain
are tied to JS/TS/Angular ecosystem: it would be more difficult to integrate backend generators for Java, C# etc
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:
it would need significant effort to implement, though it's possible to do it "1 schematic at a time" for progressive migration
testing tools needs to be updated properly at the same time to avoid regressions
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.
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.
The text was updated successfully, but these errors were encountered: