Skip to content

Commit fedc072

Browse files
Merge pull request #136 from angular/master
Update upstream
2 parents 8afcbd6 + c708890 commit fedc072

File tree

17 files changed

+147
-156
lines changed

17 files changed

+147
-156
lines changed

docs/documentation/stories/budgets.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ As applications grow in functionality, they also grow in size. Budgets is a feat
44
Angular CLI which allows you to set budget thresholds in your configuration to ensure parts
55
of your application stay within boundries which you set.
66

7-
**.angular-cli.json**
7+
**angular.json**
88
```
99
{
1010
...
11-
apps: [
12-
{
11+
"configurations": {
12+
"production": {
1313
...
1414
budgets: []
1515
}
16-
]
16+
}
1717
}
1818
```
1919

docs/documentation/stories/code-coverage.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ To generate a coverage report run the following command in the root of your proj
88
ng test --watch=false --code-coverage
99
```
1010

11-
Once the tests complete a new `/coverage` folder will appear in the project. In your Finder or Windows Explorer open the `index.html` file. You should see a report with your source code and code coverage values.
11+
Once the tests complete a new `/coverage` folder will appear in the project. In your Finder or Windows Explorer open the `index.html` file. You should see a report with your source code and code coverage values.
1212

13-
Using the code coverage percentages we can estimate how much of our code is tested. It is up to your team to determine how much code should be unit tested.
13+
Using the code coverage percentages we can estimate how much of our code is tested. It is up to your team to determine how much code should be unit tested.
1414

1515
## Code Coverage Enforcement
1616

@@ -27,6 +27,19 @@ coverageIstanbulReporter: {
2727
functions: 80
2828
}
2929
}
30-
```
30+
```
31+
32+
The `thresholds` property will enforce a minimum of 80% code coverage when the unit tests are run in the project.
33+
34+
Another option to simplify the usage of code coverage, instead of passing it via the command line every time. Is to set the value within the configuration file `angular.json`.
35+
36+
```json
37+
...
38+
"test": {
39+
"options": {
40+
"codeCoverage": true
41+
}
42+
}
43+
```
3144

32-
The `thresholds` property will enforce a minimum of 80% code coverage when the unit tests are run in the project.
45+
This will produce code coverage results whenever tests are run for the project.

docs/documentation/stories/configure-hmr.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,29 +41,29 @@ export const environment = {
4141
```
4242

4343

44-
Update `.angular-cli.json` by adding the new environment the existing environments object:
44+
Update `angular.json` to include an hmr environment as explained [here](./application-environments) and add a configuration within serve to enable hmr.
4545

4646
```json
47-
"environmentSource": "environments/environment.ts",
48-
"environments": {
49-
"dev": "environments/environment.ts",
50-
"hmr": "environments/environment.hmr.ts",
51-
"prod": "environments/environment.prod.ts"
52-
},
47+
"serve": {
48+
"configuration": {
49+
...
50+
"hmr": true
51+
}
52+
}
5353
```
5454

55-
Run `ng serve` with the flag `--hmr -e=hmr` to enable hmr and select the new environment:
55+
Run `ng serve` with the flag `--configuration hmr` to enable hmr and select the new environment:
5656

5757
```bash
58-
ng serve --hmr -e=hmr
58+
ng serve --configuration hmr
5959
```
6060

6161
Create a shortcut for this by updating `package.json` and adding an entry to the script object:
6262

6363
```json
6464
"scripts": {
6565
...
66-
"hmr": "ng serve --hmr -e=hmr"
66+
"hmr": "ng serve --configuration hmr"
6767
}
6868
```
6969

docs/documentation/stories/css-preprocessors.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ ng new sassy-project --style=sass
2828
Or set the default style on an existing project:
2929

3030
```bash
31-
ng set defaults.styleExt scss
31+
ng config schematics.@schematics/angular:component.styleext scss
32+
# note: @schematics/angular is the default schematic for the Angular CLI
3233
```
3334

3435
Style strings added to the `@Component.styles` array _must be written in CSS_ because the CLI cannot apply a pre-processor to inline styles.

docs/documentation/stories/include-bootstrap.md

Lines changed: 14 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -22,31 +22,32 @@ With the new project created and ready you will next need to install bootstrap t
2222
Using the `--save` option the dependency will be saved in package.json
2323

2424
```sh
25-
# version 3.x
2625
npm install bootstrap --save
27-
28-
# version 4.x
29-
npm install bootstrap@next --save
3026
```
3127

3228
### Configuring Project
3329

3430
Now that the project is set up it must be configured to include the bootstrap CSS.
3531

36-
- Open the file `.angular-cli.json` from the root of your project.
37-
- Under the property `apps` the first item in that array is the default application.
38-
- There is a property `styles` which allows external global styles to be applied to your application.
32+
- Open the file `angular.json` from the root of your project.
33+
- Under the property `projects` find your project.
34+
- Inside `architect.build.options` locate the `styles` property.
35+
- This property allows external global styles to be applied to your application.
3936
- Specify the path to `bootstrap.min.css`
4037

4138
It should look like the following when you are done:
4239
```json
43-
"styles": [
44-
"../node_modules/bootstrap/dist/css/bootstrap.min.css",
45-
"styles.css"
46-
],
40+
"build": {
41+
"options": {
42+
"styles": [
43+
"../node_modules/bootstrap/dist/css/bootstrap.min.css",
44+
"styles.css"
45+
],
46+
}
47+
}
4748
```
4849

49-
**Note:** When you make changes to `.angular-cli.json` you will need to re-start `ng serve` to pick up configuration changes.
50+
**Note:** When you make changes to `angular.json` you will need to re-start `ng serve` to pick up configuration changes.
5051

5152
### Testing Project
5253

@@ -74,11 +75,7 @@ cd my-app
7475
### Installing Bootstrap
7576

7677
```sh
77-
# version 3.x
78-
npm install bootstrap-sass --save
79-
80-
# version 4.x
81-
npm install bootstrap@next --save
78+
npm install bootstrap --save
8279
```
8380

8481
### Configuring Project
@@ -94,11 +91,6 @@ $icon-font-path: '../node_modules/bootstrap-sass/assets/fonts/bootstrap/';
9491
In `styles.scss` add the following:
9592

9693
```sass
97-
// version 3
98-
@import 'variables';
99-
@import '../node_modules/bootstrap-sass/assets/stylesheets/_bootstrap';
100-
101-
// version 4
10294
@import 'variables';
10395
@import '../node_modules/bootstrap/scss/bootstrap';
10496
```
@@ -117,10 +109,6 @@ Verify the bootstrap styled button appears.
117109
To ensure your variables are used open `_variables.scss` and add the following:
118110

119111
```sass
120-
// version 3
121-
$brand-primary: red;
122-
123-
// version 4
124112
$primary: red;
125113
```
126114

docs/documentation/stories/include-font-awesome.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,15 @@ npm install --save font-awesome
1919

2020
To add Font Awesome CSS icons to your app...
2121
```json
22-
// in .angular-cli.json
23-
24-
"styles": [
25-
"styles.css",
26-
"../node_modules/font-awesome/css/font-awesome.css"
27-
]
22+
// in angular.json
23+
"build": {
24+
"options": {
25+
"styles": [
26+
"../node_modules/font-awesome/css/font-awesome.css"
27+
"styles.css"
28+
],
29+
}
30+
}
2831
```
2932
### Using SASS
3033

package-lock.json

Lines changed: 26 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@angular/cli",
3-
"version": "6.0.0-rc.6",
3+
"version": "6.0.0-rc.7",
44
"description": "CLI tool for Angular",
55
"main": "packages/@angular/cli/lib/cli/index.js",
66
"trackingCode": "UA-8594346-19",

packages/@angular/cli/bin/ng-update-message.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ if (found) {
3838
The Angular CLI configuration format has been changed, and your existing configuration can
3939
be updated automatically by running the following command:
4040
41-
ng update @angular/cli --migrate-only --from=1
41+
ng update @angular/cli
4242
${'='.repeat(80)}
4343
\u001b[39m`.replace(/^ {4}/gm, ''));
4444
}

0 commit comments

Comments
 (0)