25.md (9052B)
1 # PR #25 Update dependency @angular/cli to v6 2 3 - **Status:** merged 4 - **Author:** @renovate[bot] 5 - **Created:** 2018-05-03T21:05:08Z 6 - **Branch:** renovate/angular-cli-6.x → master 7 - **Merged:** 2018-05-19T09:44:52Z 8 - **Labels:** enhancement, Dependencies 9 - **Diff:** [25.diff](./25.diff) 10 11 --- 12 13 This Pull Request updates dependency [@​angular/cli](https://github.com/angular/angular-cli) from `^1.7.3` to `^6.0.0` 14 15 16 17 <details> 18 <summary>Release Notes</summary> 19 20 ### [`v6.0.3`](https://github.com/angular/angular-cli/compare/v6.0.2...v6.0.3) 21 [Compare Source](https://github.com/angular/angular-cli/compare/v6.0.2...v6.0.3) 22 23 24 --- 25 26 ### [`v6.0.2`](https://github.com/angular/angular-cli/releases/v6.0.2) 27 [Compare Source](https://github.com/angular/angular-cli/compare/v6.0.1...v6.0.2) 28 ##### Bug Fixes 29 30 * **@​angular/cli:** Fix parsing of new options ([0820650](https://github.com/angular/angular-cli/commit/0820650)), closes [#​10802](`https://github.com/angular/angular-cli/issues/10802`) 31 32 --- 33 34 ### [`v6.0.1`](https://github.com/angular/angular-cli/releases/v6.0.1) 35 [Compare Source](https://github.com/angular/angular-cli/compare/v6.0.0...v6.0.1) 36 ##### Bug Fixes 37 38 * **@​angular/cli:** add closing single quote ([325baa6](https://github.com/angular/angular-cli/commit/325baa6)) 39 * **@​angular/cli:** clean up architect options ([c9a46eb](https://github.com/angular/angular-cli/commit/c9a46eb)) 40 * **@​angular/cli:** fix ng doc not working ([89242be](https://github.com/angular/angular-cli/commit/89242be)) 41 * **@​angular/cli:** fix PWD in cygwin ([b9c40ee](https://github.com/angular/angular-cli/commit/b9c40ee)) 42 43 --- 44 45 ### [`v6.0.0`](https://github.com/angular/angular-cli/releases/v6.0.0) 46 [Compare Source](https://github.com/angular/angular-cli/compare/v6.0.0-rc.10...v6.0.0) 47 ### CLI Version 6 – [Hamilton](https://en.wikipedia.org/wiki/Margaret_Hamilton_(scientist)) 48 49 Hello y'all, CLI team again. 50 51 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. 52 53 Also, please note that there is a blog post for version 6 [here](https://blog.angular.io/version-6-of-angular-now-available-cc56b0efa7a4). 54 #### ng eject 55 56 The 'eject' command has been temporarily disabled, as it is not yet compatible with the new 57 angular.json format. The new configuration format provides further flexibility to modify the 58 configuration of your workspace without ejecting. Ejection will be re-enabled in a future 59 release of the CLI. 60 61 In the meantime, you can eject with 1.7.4, then update your project and keep using webpack to build. 62 #### ng update 63 64 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. 65 66 Configuration information for ng update can be found [here](https://github.com/angular/devkit/blob/master/docs/specifications/update.md) 67 #### ng add 68 69 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. 70 71 For package owners: 72 `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. 73 #### PWA Support 74 75 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. 76 #### Angular Workspace 77 78 The `.angular-cli.json` configuration file is replaced with `angular.json` workspace file, a new file the lays the foundation for multiple projects in a single workspace. 79 80 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. 81 82 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. 83 84 Read more about the Angular Workspace [here](https://github.com/angular/angular-cli/wiki/angular-workspace). 85 #### Build improvements 86 87 The build system Angular CLI uses has been overhauled to be faster and more easily configurable. 88 89 We have upgrade to [Webpack 4](https://medium.com/webpack/webpack-4-released-today-6cdb994702d4) which comes with several performance and bundling improvements. 90 91 Angular Workspaces will also allow you to configure each build exactly the way you need instead of using lengthy `npm` scripts: 92 93 ``` 94 "configurations": { 95 "production": { 96 "fileReplacements": [ 97 { 98 "replace": "src/environments/environment.ts", 99 "with": "src/environments/environment.prod.ts" 100 } 101 ], 102 "optimization": true, 103 "outputHashing": "all", 104 "sourceMap": false, 105 "extractCss": true, 106 "namedChunks": false, 107 "aot": true, 108 "extractLicenses": true, 109 "vendorChunk": false, 110 "buildOptimizer": true 111 } 112 } 113 ``` 114 #### Multi application support 115 116 Angular CLI now supports multiple individual applications within one workspace, each with separate configurations and defaults. 117 118 To create another app you can use the following command: 119 120 ```sh 121 ng generate application my-other-app 122 ``` 123 124 The new application will be generated inside `projects/my-other-app`. 125 126 Now we can `serve` either application by passing the project name with the command: 127 128 ```sh 129 ng serve my-other-app 130 ``` 131 #### Library Support 132 133 Angular CLI now comes with library support via [ng-packagr](https://github.com/dherges/ng-packagr) plugged into the build system we use in Angular CLI, together with schematics for generating a library. 134 135 You can create a library in a existing workspace by running the following commands: 136 137 ``` 138 ng generate library my-lib 139 ``` 140 You should now have a library inside `projects/my-lib`. It contains a component and a service inside a NgModule. 141 142 Read more about library creation [here](https://github.com/angular/angular-cli/wiki/stories-create-library). 143 #### Schematic Defaults 144 145 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. 146 147 Values can be provided at the root level: 148 ```json 149 // angular.json 150 { 151 ... 152 "schematics": { 153 "@​schematics/angular:component.inlineTemplate": true 154 } 155 } 156 ``` 157 158 Or at the project level: 159 ```json 160 // angular.json 161 { 162 "projects": { 163 "my-project": { 164 "schematics": { 165 "@​schematics/angular:component.inlineTemplate": true 166 } 167 } 168 } 169 } 170 ``` 171 172 Or even at the global level, same as at the root level, except in a file located here: 173 `[homedir]/.angular-config.json` 174 #### Smart Defaults 175 176 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. 177 178 This example will set the value of the name option to the first argument. As you see defined in the `$default` value. 179 ```json 180 "name": { 181 "type": "string", 182 "description": "The name option.", 183 "$default": { 184 "$source": "argv", 185 "index": 0 186 } 187 } 188 ``` 189 #### Breaking changes 190 191 The `allowOutsideOutDir` option in [assets](https://github.com/angular/angular-cli/wiki/stories-asset-configuration) has been removed. 192 193 The `serve` option in `ng e2e` is replaced with `devServerTarget`. It allows you to specify which server target to use, and if it is set to empty string nothing will be served. 194 195 The `completion` command has been removed as the functionality no longer aligns with this version. 196 197 ---- 198 199 Special thanks to everyone who participated in this release: 200 201 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 202 203 --- 204 205 </details> 206 207 208 209 210 --- 211 212 This PR has been generated by [Renovate Bot](https://renovatebot.com). 213