Skip to content

Commit 9bad933

Browse files
Merge pull request #2 from angular/master
Update upstream
2 parents a815a4a + 3141673 commit 9bad933

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+950
-388
lines changed

.github/SAVED_REPLIES.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Saved Responses for Angular CLI's Issue Tracker
2+
3+
The following are canned responses that the Angular CLI team should use to close issues on our issue tracker that fall into the listed resolution categories.
4+
5+
Since GitHub currently doesn't allow us to have a repository-wide or organization-wide list of [saved replies](https://help.github.com/articles/working-with-saved-replies/), these replies need to be maintained by individual team members. Since the responses can be modified in the future, all responses are versioned to simplify the process of keeping the responses up to date.
6+
7+
8+
## Angular CLI: Already Fixed (v1)
9+
```
10+
Thanks for reporting this issue. Luckily, it has already been fixed in one of the recent releases. Please update to the most recent version to resolve the problem.
11+
12+
If the problem persists in your application after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior. You can use `ng new repro-app` to create a new project where you reproduce the problem.
13+
```
14+
15+
## Angular CLI: Don't Understand (v1)
16+
```
17+
I'm sorry, but we don't understand the problem you are reporting.
18+
19+
If the problem persists, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior. You can use `ng new repro-app` to create a new project where you reproduce the problem.
20+
```
21+
22+
23+
## Angular CLI: Duplicate (v1)
24+
```
25+
Thanks for reporting this issue. However, this issue is a duplicate of an existing issue #<ISSUE_NUMBER>. Please subscribe to that issue for future updates.
26+
```
27+
28+
29+
## Angular CLI: Insufficient Information Provided (v1)
30+
```
31+
Thanks for reporting this issue. However, you didn't provide sufficient information for us to understand and reproduce the problem. Please check out [our submission guidelines](https://github.com/angular/angular-cli/blob/master/CONTRIBUTING.md#-submitting-an-issue) to understand why we can't act on issues that are lacking important information.
32+
33+
If the problem persists, please file a new issue and ensure you provide all of the required information when filling out the issue template.
34+
```
35+
36+
## Angular CLI: Issue Outside of Angular CLI (v1)
37+
```
38+
I'm sorry, but this issue is not caused by Angular CLI. Please contact the author(s) of project <PROJECT NAME> or file issue on their issue tracker.
39+
```
40+
41+
42+
## Angular CLI: Non-reproducible (v1)
43+
```
44+
I'm sorry, but we can't reproduce the problem following the instructions you provided.
45+
46+
If the problem persists, please open a new issue following [our submission guidelines](https://github.com/angular/angular-cli/blob/master/CONTRIBUTING.md#-submitting-an-issue).
47+
```
48+
49+
## Angular CLI: Obsolete (v1)
50+
```
51+
Thanks for reporting this issue. This issue is now obsolete due to changes in the recent releases. Please update to the most recent Angular CLI version.
52+
53+
If the problem persists after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior.
54+
```
55+
56+
57+
## Angular CLI: Support Request (v1)
58+
```
59+
Hello, we reviewed this issue and determined that it doesn't fall into the bug report or feature request category. This issue tracker is not suitable for support requests, please repost your issue on [StackOverflow](http://stackoverflow.com/) using tag `angular-cli`.
60+
61+
If you are wondering why we don't resolve support issues via the issue tracker, please [check out this explanation](https://github.com/angular/angular-cli/blob/master/CONTRIBUTING.md#-got-a-question-or-problem).
62+
```

CONTRIBUTING.md

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,17 @@ Help us keep Angular open and inclusive. Please read and follow our [Code of Con
1818

1919
## <a name="question"></a> Got a Question or Problem?
2020

21-
If you have questions about how to *use* Angular CLI, please direct them to [StackOverflow][stackoverflow]. Please note that Angular CLI is still in early developer preview, and the core team's capacity to answer usage questions is limited. We are also available on [Gitter][gitter].
21+
Please, do not open issues for the general support questions as we want to keep GitHub issues for bug reports and feature requests. You've got much better chances of getting your question answered on [StackOverflow](https://stackoverflow.com/questions/tagged/angular-cli) where the questions should be tagged with tag `angular-cli`.
22+
23+
StackOverflow is a much better place to ask questions since:
24+
25+
- there are thousands of people willing to help on StackOverflow
26+
- questions and answers stay available for public viewing so your question / answer might help someone else
27+
- StackOverflow's voting system assures that the best answers are prominently visible.
28+
29+
To save your and our time we will be systematically closing all the issues that are requests for general support and redirecting people to StackOverflow.
30+
31+
If you would like to chat about the question in real-time, you can reach out via [our gitter channel][gitter].
2232

2333
## <a name="issue"></a> Found an Issue?
2434
If you find a bug in the source code or a mistake in the documentation, you can help us by
@@ -40,24 +50,23 @@ and help you to craft the change so that it is successfully accepted into the pr
4050
## <a name="submit"></a> Submission Guidelines
4151

4252
### <a name="submit-issue"></a> Submitting an Issue
43-
Before you submit an issue, search the archive, maybe your question was already answered.
4453

45-
If your issue appears to be a bug, and hasn't been reported, open a new issue.
46-
Help us to maximize the effort we can spend fixing issues and adding new
47-
features, by not reporting duplicate issues. Providing the following information will increase the
48-
chances of your issue being dealt with quickly:
54+
Before you submit an issue, please search the issue tracker, maybe an issue for your problem already exists and the discussion might inform you of workarounds readily available.
55+
56+
We want to fix all the issues as soon as possible, but before fixing a bug we need to reproduce and confirm it. In order to reproduce bugs we will systematically ask you to provide a minimal reproduction scenario using `ng new repro-app`. Having a reproducible scenario gives us wealth of important information without going back & forth to you with additional questions like:
57+
58+
- version of Angular CLI used
59+
- `.angular-cli.json` configuration
60+
- 3rd-party libraries and their versions
61+
- and most importantly - a use-case that fails
62+
63+
A minimal reproduce scenario using allows us to quickly confirm a bug (or point out coding problem) as well as confirm that we are fixing the right problem.
64+
65+
We will be insisting on a minimal reproduce scenario in order to save maintainers time and ultimately be able to fix more bugs. Interestingly, from our experience users often find coding problems themselves while preparing a minimal repository. We understand that sometimes it might be hard to extract essentials bits of code from a larger code-base but we really need to isolate the problem before we can fix it.
4966

50-
* **Overview of the Issue** - if an error is being thrown a non-minified stack trace helps
51-
* **Angular CLI Version** - what version of the CLI is affected (e.g. 0.1.2)
52-
* **Motivation for or Use Case** - explain what are you trying to do and why the current behavior is a bug for you
53-
* **Browsers and Operating System** - is this a problem with all browsers?
54-
* **Reproduce the Error** - provide a live example (using [Plunker][plunker],
55-
[JSFiddle][jsfiddle] or [Runnable][runnable]) or a unambiguous set of steps
56-
* **Related Issues** - has a similar issue been reported before?
57-
* **Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point to what might be
58-
causing the problem (line of code or commit)
67+
Unfortunately we are not able to investigate / fix bugs without a minimal reproduction, so if we don't hear back from you we are going to close an issue that don't have enough info to be reproduced.
5968

60-
You can file new issues by providing the above information [here](https://github.com/angular/angular-cli/issues/new).
69+
You can file new issues by filling out our [new issue form](https://github.com/angular/angular-cli/issues/new).
6170

6271

6372
### <a name="submit-pr"></a> Submitting a Pull Request (PR)
@@ -95,7 +104,7 @@ Before you submit your Pull Request (PR) consider the following guidelines:
95104
* In GitHub, send a pull request to `angular-cli:master`.
96105
* If we suggest changes then:
97106
* Make the required updates.
98-
* Re-run the Angular CLI test suites for JS and Dart to ensure tests are still passing.
107+
* Re-run the Angular CLI test suites to ensure tests are still passing.
99108
* Rebase your branch and force push to your GitHub repository (this will update your Pull Request):
100109

101110
```shell
@@ -137,7 +146,7 @@ from the main (upstream) repository:
137146
## <a name="rules"></a> Coding Rules
138147
To ensure consistency throughout the source code, keep these rules in mind as you are working:
139148
140-
* All features or bug fixes **must be tested** by one or more specs (unit-tests).
149+
* All features or bug fixes **must be tested** by one or more specs (unit-tests or e2e-tests).
141150
* All public API methods **must be documented**. (Details TBC).
142151
* We follow [Google's JavaScript Style Guide][js-style-guide], but wrap all code at
143152
**100 characters**.
@@ -230,12 +239,9 @@ changes to be accepted, the CLA must be signed. It's a quick process, we promise
230239
[coc]: https://github.com/angular/code-of-conduct/blob/master/CODE_OF_CONDUCT.md
231240
[commit-message-format]: https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#
232241
[corporate-cla]: http://code.google.com/legal/corporate-cla-v1.0.html
233-
[dev-doc]: https://github.com/angular/angular/blob/master/DEVELOPER.md
242+
[dev-doc]: https://github.com/angular/angular-cli#development-hints-for-working-on-angular-cli
234243
[GitHub]: https://github.com/angular/angular-cli
235244
[gitter]: https://gitter.im/angular/angular-cli
236245
[individual-cla]: http://code.google.com/legal/individual-cla-v1.0.html
237246
[js-style-guide]: https://google.github.io/styleguide/jsguide.html
238-
[jsfiddle]: http://jsfiddle.net/
239-
[plunker]: http://plnkr.co/edit
240-
[runnable]: http://runnable.com/
241247
[stackoverflow]: http://stackoverflow.com/questions/tagged/angular-cli

README.md

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ CLI for Angular applications based on the [ember-cli](http://www.ember-cli.com/)
1212
## Note
1313

1414
The CLI is now in 1.0.
15-
If you are updating from a beta or RC version, check out our [1.0 Update Guide]
16-
(https://github.com/angular/angular-cli/wiki/stories-1.0-update).
15+
If you are updating from a beta or RC version, check out our [1.0 Update Guide](https://github.com/angular/angular-cli/wiki/stories-1.0-update).
1716

1817
If you wish to collaborate, check out [our issue list](https://github.com/angular/angular-cli/issues).
1918

@@ -31,7 +30,7 @@ with NPM 3 or higher.
3130
* [Generating a New Project](#generating-and-serving-an-angular-project-via-a-development-server)
3231
* [Generating Components, Directives, Pipes and Services](#generating-components-directives-pipes-and-services)
3332
* [Updating Angular CLI](#updating-angular-cli)
34-
* [Development Hints for hacking on Angular CLI](#development-hints-for-hacking-on-angular-cli)
33+
* [Development Hints for working on Angular CLI](#development-hints-for-working-on-angular-cli)
3534
* [Documentation](#documentation)
3635
* [License](#license)
3736

@@ -83,15 +82,16 @@ You can find all possible blueprints in the table below:
8382

8483
Scaffold | Usage
8584
--- | ---
86-
Component | `ng g component my-new-component`
87-
Directive | `ng g directive my-new-directive`
88-
Pipe | `ng g pipe my-new-pipe`
89-
Service | `ng g service my-new-service`
90-
Class | `ng g class my-new-class`
91-
Guard | `ng g guard my-new-guard`
92-
Interface | `ng g interface my-new-interface`
93-
Enum | `ng g enum my-new-enum`
94-
Module | `ng g module my-module`
85+
[Component](https://github.com/angular/angular-cli/wiki/generate-component) | `ng g component my-new-component`
86+
[Directive](https://github.com/angular/angular-cli/wiki/generate-directive) | `ng g directive my-new-directive`
87+
[Pipe](https://github.com/angular/angular-cli/wiki/generate-pipe) | `ng g pipe my-new-pipe`
88+
[Service](https://github.com/angular/angular-cli/wiki/generate-service) | `ng g service my-new-service`
89+
[Class](https://github.com/angular/angular-cli/wiki/generate-class) | `ng g class my-new-class`
90+
[Guard](https://github.com/angular/angular-cli/wiki/generate-guard) | `ng g guard my-new-guard`
91+
[Interface](https://github.com/angular/angular-cli/wiki/generate-interface) | `ng g interface my-new-interface`
92+
[Enum](https://github.com/angular/angular-cli/wiki/generate-enum) | `ng g enum my-new-enum`
93+
[Module](https://github.com/angular/angular-cli/wiki/generate-module) | `ng g module my-module`
94+
9595

9696
### Updating Angular CLI
9797

@@ -120,7 +120,7 @@ npm install
120120
You can find more details about changes between versions in [CHANGELOG.md](https://github.com/angular/angular-cli/blob/master/CHANGELOG.md).
121121

122122

123-
## Development Hints for hacking on Angular CLI
123+
## Development Hints for working on Angular CLI
124124

125125
### Working with master
126126

@@ -132,6 +132,9 @@ npm link
132132

133133
`npm link` is very similar to `npm install -g` except that instead of downloading the package
134134
from the repo, the just cloned `angular-cli/` folder becomes the global package.
135+
Additionally, this repository publishes several packages and we use special logic to load all of them
136+
on development setups.
137+
135138
Any changes to the files in the `angular-cli/` folder will immediately affect the global `@angular/cli` package,
136139
allowing you to quickly test any changes you make to the cli project.
137140

@@ -155,6 +158,12 @@ You can also use `ng new foo --link-cli` to automatically link the `@angular/cli
155158
Please read the official [npm-link documentation](https://www.npmjs.org/doc/cli/npm-link.html)
156159
and the [npm-link cheatsheet](http://browsenpm.org/help#linkinganynpmpackagelocally) for more information.
157160

161+
To run the Angular CLI test suite use the `node tests/run_e2e.js` command.
162+
It can also receive a filename to only run that test (e.g. `node tests/run_e2e.js tests/e2e/tests/build/dev-build.ts`).
163+
164+
As part of the test procedure, all packages will be built and linked.
165+
You will need to re-run `npm link` to re-link the development Angular CLI environment after tests finish.
166+
158167

159168
## Documentation
160169

docs/documentation/generate/component.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
`--module` (alias: `-m`)
7373
</p>
7474
<p>
75-
Allows specification of the declaring module.
75+
Allows specification of the declaring module's file name (e.g `app.module.ts`).
7676
</p>
7777
</details>
7878

docs/documentation/new.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,6 @@ Default applications are created in a directory of the same name, with an initia
4848
</p>
4949
</details>
5050

51-
<details>
52-
<summary>ng4</summary>
53-
<p>
54-
`--ng4` _default value: false_
55-
</p>
56-
<p>
57-
Create a project with Angular 4 in the template.
58-
</p>
59-
</details>
60-
6151
<details>
6252
<summary>prefix</summary>
6353
<p>

docs/documentation/stories.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Stories describing how to do more with the CLI
44

5-
- [RC Update](stories/rc-update)
5+
- [1.0 Update](stories/1.0-update)
66
- [Asset Configuration](stories/asset-configuration)
77
- [Autocompletion](stories/autocompletion)
88
- [CSS Preprocessors](stories/css-preprocessors)
@@ -22,3 +22,4 @@
2222
- [Corporate Proxy](stories/using-corporate-proxy)
2323
- [Internationalization (i18n)](stories/internationalization)
2424
- [Serve from Disk](stories/disk-serve)
25+
- [Code Coverage](stories/code-coverage)

docs/documentation/stories/1.0-update.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Angular CLI RC migration guide
1+
# Angular CLI migration guide
22

33
In this migration guide we'll be looking at some of the major changes to CLI projects in the
44
last two months.
@@ -8,18 +8,12 @@ Most of these changes were not breaking changes and your project should work fin
88
But if you've been waiting for the perfect time to update, this is it!
99
Along with major rebuild speed increases, we've been busy adding a lot of features.
1010

11-
RC means release candidate and we intend to stick to it.
12-
Unless there is a major breaking bug, we will not change the public surface of the API and
13-
its generated projects.
14-
15-
This means that a project upgraded now should need no more code changes all the way to 1.0.
16-
1711
Documentation has also completely moved to [the wiki](https://github.com/angular/angular-cli/wiki).
1812
The new [Stories](https://github.com/angular/angular-cli/wiki/stories) section covers common usage
1913
scenarios, so be sure to have a look!
2014

2115
Below are the changes between a project generated two months ago, with `1.0.0-beta.24` and
22-
a `1.0.0-rc.1` project.
16+
a `1.0.0` project.
2317
If you kept your project up to date you might have a lot of these already.
2418

2519
You can find more details about changes between versions in [CHANGELOG.md](https://github.com/angular/angular-cli/blob/master/CHANGELOG.md).
@@ -302,7 +296,7 @@ Then update `protractor.conf.js` to use the e2e config as well:
302296
```
303297
beforeLaunch: function() {
304298
require('ts-node').register({
305-
project: 'e2e'
299+
project: 'e2e/tsconfig.e2e.json'
306300
});
307301
},
308302
```
@@ -450,7 +444,7 @@ Update `beforeLaunch` as described in [One tsconfig per app](#one-tsconfig-per-a
450444
```
451445
beforeLaunch: function() {
452446
require('ts-node').register({
453-
project: 'e2e'
447+
project: 'e2e/tsconfig.e2e.json'
454448
});
455449
},
456450
```
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Code Coverage
2+
3+
With the Angular CLI we can run unit tests as well as create code coverage reports. Code coverage reports allow us to see any parts of our code base that may not be properly tested by our unit tests.
4+
5+
To generate a coverage report run the following command in the root of your project
6+
7+
```bash
8+
ng test --watch=false --code-coverage
9+
```
10+
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.
12+
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.
14+
15+
## Code Coverage Enforcement
16+
17+
If your team decides on a set minimum amount to be unit tested you can enforce this minimum with the Angular CLI. For example our team would like the code base to have a minimum of 80% code coverage. To enable this open the `karma.conf.js` and add the following in the `coverageIstanbulReporter:` key
18+
19+
```javascript
20+
coverageIstanbulReporter: {
21+
reports: [ 'html', 'lcovonly' ],
22+
fixWebpackSourcePaths: true,
23+
thresholds: {
24+
statements: 80,
25+
lines: 80,
26+
branches: 80,
27+
functions: 80
28+
}
29+
}
30+
```
31+
32+
The `thresholds` property will enforce a minimum of 80% code coverage when the unit tests are run in the project.

docs/documentation/stories/internationalization.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ When your app is ready, you can extract the strings to translate from your templ
1313
`ng xi18n` command.
1414

1515
By default it will create a file named `messages.xlf` in your `src` folder.
16-
You can use [parameters from the xi18n command](../xi18n) to change the format,
16+
You can use [parameters from the xi18n command](./xi18n) to change the format,
1717
the name, the location and the source locale of the extracted file.
1818

1919
For example to create a file in the `src/locale` folder you would use:
@@ -69,4 +69,4 @@ ng build --aot --output-path dist/fr --base-href fr --locale fr --i18n-format xl
6969
If you need more details about how to create scripts to generate the app in multiple
7070
languages and how to setup Apache 2 to serve them from different subdirectories,
7171
you can read [this great tutorial](https://medium.com/@feloy/deploying-an-i18n-angular-app-with-angular-cli-fc788f17e358#.1xq4iy6fp)
72-
by Philippe Martin.
72+
by Philippe Martin.

0 commit comments

Comments
 (0)