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
, ande2e
for 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
angularCompilerOptions
object withenableIvy
set totrue
- Includes an
- cli/tsconfig.app.json
- schematics
- angular.json
- Includes a
my-lib
project that contains a library with example schematics
- Includes a
- angular.json
- service-worker
- angular.json
- Has
serviceWorker
set totrue
in theproduction
build target
- Has
- package.json
- Includes
@angular/service-worker
independencies
- Includes
- angular.json
- testing
- angular.json
- Includes
src/test.css
in thestyles
for thetest
target
- Includes
- angular.json
- universal
- angular.json
- Includes a
server
target in thebuild
architect runners
- Includes a
- package.json
- Includes custom scripts for building the
server
- Includes additional
dependencies
on@angular/platform-server
,@nguniversal/express-engine
, andexpress
- Includes additional
devDependencies
on@nguniversal/builders
and@types/express
- Includes custom scripts for building the
- angular.json