Update dependency @angular/cli to v6 - autoclosed #167
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
~1.7.3
->~6.0.0
By merging this PR, the below issues will be automatically resolved and closed:
By merging this PR, the below issues will be automatically resolved and closed:
Release Notes
angular/angular-cli
v6.0.0
Compare Source
CLI Version 6 – Hamilton
Hello y'all, CLI team again.
This is a really big release for us, and listing each changes individually would be too much information for you. As such we're going to summarize the new features and changes that are included, from a higher point of view.
Also, please note that there is a blog post for version 6 here.
ng eject
The 'eject' command has been temporarily disabled, as it is not yet compatible with the new
angular.json format. The new configuration format provides further flexibility to modify the
configuration of your workspace without ejecting. Ejection will be re-enabled in a future
release of the CLI.
In the meantime, you can eject with 1.7.4, then update your project and keep using webpack to build.
ng update
A new Angular CLI command to help simplify keeping your projects up to date with the latest versions. Packages can define logic which will be applied to your projects to ensure usage of latest features as well as making changes to reduce or eliminate the impact related to breaking changes.
Configuration information for ng update can be found here
ng add
A new Angular CLI command provides package authors the ability to include dynamic setup instructions as part of the installation procedures. When a user installs a package via
ng add
and that package includes a schematic named "ng-add" logic will run to set up that package within your project.For package owners:
ng-add
is powered by a single schematic named "ng-add" within your package's schematics collection. Options will be passed through to your schematic when running the schematic to allow for further configuration options.PWA Support
Progressive Web Apps have grown in popularity and support with all major browswers supporting service workers. Adding the configuration and assets to configure your applications as PWAs can be confusing and time consuming, to simplify the process you can now run
ng add @​angular/pwa --project [project-name]
to configure the supplied project as a progressive web application.Angular Workspace
The
.angular-cli.json
configuration file is replaced withangular.json
workspace file, a new file the lays the foundation for multiple projects in a single workspace.In this file you can find every configuration item and default that Angular CLI uses. Having all configuration on file allows you to avoid typing out multiple configuration flags on each command and
npm
script.If your editor has JSON schema support, you will be able to see auto-completion with suggestions and defaults for each property in the
angular.json
file.Read more about the Angular Workspace here.
Build improvements
The build system Angular CLI uses has been overhauled to be faster and more easily configurable.
We have upgrade to Webpack 4 which comes with several performance and bundling improvements.
Angular Workspaces will also allow you to configure each build exactly the way you need instead of using lengthy
npm
scripts:Multi application support
Angular CLI now supports multiple individual applications within one workspace, each with separate configurations and defaults.
To create another app you can use the following command:
The new application will be generated inside
projects/my-other-app
.Now we can
serve
either application by passing the project name with the command:Library Support
Angular CLI now comes with library support via ng-packagr plugged into the build system we use in Angular CLI, together with schematics for generating a library.
You can create a library in a existing workspace by running the following commands:
You should now have a library inside
projects/my-lib
. It contains a component and a service inside a NgModule.Read more about library creation here.
Schematic Defaults
Default values for schematics can be configured for any schematic property in any schematic collection. In previous versions the Angular CLI only provided access to configure defaults for certain properties of the default schematics.
Values can be provided at the root level:
Or at the project level:
Or even at the global level, same as at the root level, except in a file located here:
[homedir]/.angular-config.json
Smart Defaults
Smart defaults is a new feature within Schematics which grants authors of schematics more control about how their values are parsed. An example is to specify how arguments (unnamed options) are parsed from the command line.
This example will set the value of the name option to the first argument. As you see defined in the
$default
value.Breaking changes
The
allowOutsideOutDir
option in assets has been removed.The
serve
option inng e2e
is replaced withdevServerTarget
. It allows you to specify which server target to use, and if it is set to empty string nothing will be served.The
completion
command has been removed as the functionality no longer aligns with this version.The
environment
option in build related commands is replaced withfileReplacements
, please see the wiki for how it can be used.Special thanks to everyone who participated in this release:
Charles Lyding, Filipe Silva, Hans Larsen, Mike Brocchi, Alan Agius, Rahul Bhooteshwar, Cyrille Tuzi, Noel Mace, Christofer Steingrefer, Vikram Subramanian, Sébastien Cevey, Maxim Salnikov, Jose E, Cédric Exbrayat, sergey.sokolov, Yaroslav Admin, Will 保哥, Sylvain Dumont, Suguru Inatomi, Steven Enten, Stephen Fluin, Shai Reznik, PhilippeMorier, Miles Malerba, Michael Prentice, Matthias Lischka, Luke Chatton, Luis Confraria, Kasidit Iamthong, Jiaren Liu, GerbetMikhaël, George Kalpakas, Evan Carroll, Danny, Brandon, Alan
v1.7.4
Compare Source
Bug Fixes