At the moment, after updating angular-cli packages, running ng init would go through all the generated files, including initial NgModules, AppComponent etc, which most likely would be changed by the developer to fit their apps' needs.
I think when running ng init against existing projects, we should be only asked if we want to update important configuration files that matters to angular-cli.
This is actually something we're looking at, yes. This exact same suggestion.
I think the main ones are package.json and angular-cli.json, updated in a non-destructive fashion.
@filipesilva , What about the possible breaking changes involved in the angular major version upgrade which may involve changes in the cli blueprints? Why not have a configuration within angular-cli.json file which can conditionally check the files other than package.json & angular-cli.json.
I prefer updating everything with ng init and using the ide or a diff tool to compare the changes, so I can be sure that everything is up-to-date.
@zsfarkas I do the same for now, but find that it can be better to exclude app-related files.
I've gone through 4 or 5 angular-cli upgrades. These are the only times I recall needing to modifying other files aside from package.json and angular-cli.json
NgModule bootstrap change from Angular2 project
app.module.ts needed to be updated and possibly a couple other app files.
angular-cli testing changes
Two or three versions ago, the unit testing configuration was updated.
So +1, it would be nice if the update process didn't go through a diff on all files unless necessary for that release.
Also, someone suggested making the command ng update https://github.com/angular/angular-cli/issues/4007
We've removed ng init for now. In the future we're going to add a 'real' update functionality that would do this and more.
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
This is actually something we're looking at, yes. This exact same suggestion.
I think the main ones are
package.jsonandangular-cli.json, updated in a non-destructive fashion.