Closed arthur-melo closed 7 years ago
I am not sure about this, so I vote for no right now.
I will talk with the CLI team to see their opinion.
Heya, I'm one of the CLI maintainers.
This doesn't sounds like a very good idea overall IMHO. It's a massive overkill to add the whole of Angular CLI (with all it's specific webpack version, loaders, css preprocessors, etc) just to get generator support in case a user wants it.
Right now the CLI requires generators to be used inside of a projects (which means something that has a .angular-cli.json
and a local installation).
I think what would really be useful is that there was a way to use your global CLI as a generator in other projects. Something like ng generate component my-comp --force --root="src/"
.
I'll bring it up next meeting.
Thanks for the responses, I'll close this PR until further notice!
Re-adds Angular-CLI with an ejected configuration and working generators.
angular-cli offers a multitude of features for managing Angular projects from within the command line, one of these features, the
ng generate
is very useful for rapid prototyping. It enables you to create components by issuing a simpleng generate component|directive|pipe|module|etc <name>
(Docs).Angular-CLI is a build tool by itself and wasn't playing nicely with this quickstart, but, as of version v1.0.0-beta.32 they added a
ng eject
feature that decouples its internal webpack config to an external file. Some of the wrapper functionalities get disabled if you eject your angular-cli project, making it an interesting option for this quickstart, as it won't break the current build system.I think it is a valid option for this quickstart, as it won't modify the current build system and will also enable the generator functionality for those who find it useful.