1.9 KiB
1.9 KiB
How to update the CLI project
The Angular CLI default setup is updated using ng update. Any necessary file changes will be done automatically through migration schematics.
In the cli folder, update the Angular CLI depedencies to the latest version:
ng update @angular/cli --next
Then update the Angular Framework dependencies to the latest version:
ng update @angular/core --next
Commit any changes to the cli folder to the repository.
Updating other CLI-based projects
Along with the boilerplate files for the cli folder, the other cli-based projects need to be updated also. Each cli-based project has slightly modified files specific to the project type. Make sure any necessary changes to these projects are made also to be in alignment with the cli project files.
The specific changes to each project type are listed below:
- i18n
- angular.json
- Includes additional configurations for
build,serve, ande2efor different locales
- Includes additional configurations for
- package.json
- Includes custom scripts for building and serving different locales
- angular.json
- ivy
- cli/tsconfig.app.json
- Includes an
angularCompilerOptionsobject withenableIvyset totrue
- Includes an
- cli/tsconfig.app.json
- schematics
- angular.json
- Includes a
my-libproject that contains a library with example schematics
- Includes a
- angular.json
- service-worker
- angular.json
- Has
serviceWorkerset totruein theproductionbuild target
- Has
- package.json
- Includes
@angular/service-workerindependencies
- Includes
- angular.json
- testing
- angular.json
- Includes
src/test.cssin thestylesfor thetesttarget
- Includes
- angular.json
- universal
- angular.json
- Includes a
servertarget in thebuildarchitect runners
- Includes a
- package.json
- Includes custom scripts for building the
server - Includes additional
dependencieson@nguniversal/common,@nguniversal/express-engine, and@nguniversal/module-map-ngfactory-loader - Includes
devDependencieson@angular/platform-server, andts-loader
- Includes custom scripts for building the
- angular.json