Skip to content

Commit 94c83e4

Browse files
Merge pull request #27 from angular/master
Update upstream
2 parents 09ced1f + ab2572e commit 94c83e4

File tree

13 files changed

+169
-21
lines changed

13 files changed

+169
-21
lines changed

CHANGELOG.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,66 @@
1+
<a name="1.1.0-rc.0"></a>
2+
# [1.1.0-rc.0](https://github.com/angular/angular-cli/compare/v1.1.0-beta.1...v1.1.0-rc.0) (2017-05-15)
3+
4+
5+
### Bug Fixes
6+
7+
* **@angular/cli:** adds language to index.html for accessibility ([cfe60b5](https://github.com/angular/angular-cli/commit/cfe60b5))
8+
* **@angular/cli:** allow e2e multi capabilities ([4f48be0](https://github.com/angular/angular-cli/commit/4f48be0)), closes [#975](https://github.com/angular/angular-cli/issues/975)
9+
* **@angular/cli:** enable full node module resolution for project deps ([#6276](https://github.com/angular/angular-cli/issues/6276)) ([54b1e35](https://github.com/angular/angular-cli/commit/54b1e35))
10+
* **@angular/cli:** language-service as devDeps only ([#6257](https://github.com/angular/angular-cli/issues/6257)) ([02aaec4](https://github.com/angular/angular-cli/commit/02aaec4))
11+
* **@angular/cli:** prefix `historyApiFallback.index` with `deployUrl` ([#6279](https://github.com/angular/angular-cli/issues/6279)) ([a5cfdde](https://github.com/angular/angular-cli/commit/a5cfdde))
12+
13+
14+
15+
<a name="1.1.0-beta.1"></a>
16+
# [1.1.0-beta.1](https://github.com/angular/angular-cli/compare/v1.0.1...v1.1.0-beta.1) (2017-05-09)
17+
18+
19+
### Bug Fixes
20+
21+
* **@angular/cli:** add error message when missing config env variable ([#5980](https://github.com/angular/angular-cli/issues/5980)) ([11d0afc](https://github.com/angular/angular-cli/commit/11d0afc))
22+
* **@angular/cli:** fix text descriptions ([17ae140](https://github.com/angular/angular-cli/commit/17ae140)), closes [#5501](https://github.com/angular/angular-cli/issues/5501)
23+
* **@angular/cli:** fixing component blueprint indent ([0ef9eb7](https://github.com/angular/angular-cli/commit/0ef9eb7))
24+
* **@angular/cli:** format files according to tslint ([377a062](https://github.com/angular/angular-cli/commit/377a062)), closes [#5751](https://github.com/angular/angular-cli/issues/5751)
25+
* **@angular/cli:** import at least one locale-data with intl ([#6190](https://github.com/angular/angular-cli/issues/6190)) ([1cc979f](https://github.com/angular/angular-cli/commit/1cc979f))
26+
* **@angular/cli:** install webpack at ejection ([#5745](https://github.com/angular/angular-cli/issues/5745)) ([8e2f8cf](https://github.com/angular/angular-cli/commit/8e2f8cf))
27+
* **@angular/cli:** ng get: return whole config root when no path provided. ([a5d8bc1](https://github.com/angular/angular-cli/commit/a5d8bc1)), closes [#5887](https://github.com/angular/angular-cli/issues/5887)
28+
* **@angular/cli:** open option in serve command should open localhost when host is 0.0.0.0 ([23c039d](https://github.com/angular/angular-cli/commit/23c039d)), closes [#5743](https://github.com/angular/angular-cli/issues/5743)
29+
* **@angular/cli:** properly support CSS url()'s with whitespace ([d9af12c](https://github.com/angular/angular-cli/commit/d9af12c))
30+
* **@angular/cli:** remove default for test runners ([e7966a2](https://github.com/angular/angular-cli/commit/e7966a2))
31+
* **@angular/cli:** removes redundant rules from tslint.json ([#5783](https://github.com/angular/angular-cli/issues/5783)) ([d90292e](https://github.com/angular/angular-cli/commit/d90292e)), closes [#5755](https://github.com/angular/angular-cli/issues/5755)
32+
* correctly generate changelog ([3ec74e2](https://github.com/angular/angular-cli/commit/3ec74e2))
33+
* **@angular/cli:** simplify import path if possible ([#6184](https://github.com/angular/angular-cli/issues/6184)) ([2d42a58](https://github.com/angular/angular-cli/commit/2d42a58)), closes [#6183](https://github.com/angular/angular-cli/issues/6183)
34+
* **@angular/cli:** small typo on generated app.component.html ([6eeb9de](https://github.com/angular/angular-cli/commit/6eeb9de))
35+
* **@angular/cli:** Throw error when no key provided for ng get ([382ba8d](https://github.com/angular/angular-cli/commit/382ba8d)), closes [#5887](https://github.com/angular/angular-cli/issues/5887)
36+
* **@angular/cli:** Update README.md project generation text. ([#5958](https://github.com/angular/angular-cli/issues/5958)) ([a67eb07](https://github.com/angular/angular-cli/commit/a67eb07))
37+
* **@ngtools/logger:** add typings and other information to logger package.json ([698aa3e](https://github.com/angular/angular-cli/commit/698aa3e))
38+
39+
40+
### Features
41+
42+
* **@angular/cli:** add flag to not delete output path ([8bf040b](https://github.com/angular/angular-cli/commit/8bf040b)), closes [#5925](https://github.com/angular/angular-cli/issues/5925) [#6193](https://github.com/angular/angular-cli/issues/6193)
43+
* **@angular/cli:** add host check flags to ng serve ([a54a991](https://github.com/angular/angular-cli/commit/a54a991)), closes [#6070](https://github.com/angular/angular-cli/issues/6070)
44+
* **@angular/cli:** add import flag to modules ([8b220a4](https://github.com/angular/angular-cli/commit/8b220a4)), closes [#5377](https://github.com/angular/angular-cli/issues/5377)
45+
* **@angular/cli:** add language service in devDependencies section ([bb99fac](https://github.com/angular/angular-cli/commit/bb99fac))
46+
* **@angular/cli:** add option to use lint to adjust generated files ([a3bf529](https://github.com/angular/angular-cli/commit/a3bf529))
47+
* **@angular/cli:** add publicPath support via command and angular-cli.json for webpack-dev-server ([8c78fb9](https://github.com/angular/angular-cli/commit/8c78fb9)), closes [#2727](https://github.com/angular/angular-cli/issues/2727)
48+
* **@angular/cli:** add some rules from tslint 4.5 ([d482986](https://github.com/angular/angular-cli/commit/d482986))
49+
* **@angular/cli:** adding option to search docs as well ([5e39361](https://github.com/angular/angular-cli/commit/5e39361))
50+
* **@angular/cli:** allow lint project setting to be optional ([8035f54](https://github.com/angular/angular-cli/commit/8035f54))
51+
* **@angular/cli:** always use named webpack modules in dev builds ([b07f631](https://github.com/angular/angular-cli/commit/b07f631))
52+
* **@angular/cli:** bump to tslint 5 & codelyzer 3 ([af758b8](https://github.com/angular/angular-cli/commit/af758b8))
53+
* **@angular/cli:** improve ng test performance ([1cd0a08](https://github.com/angular/angular-cli/commit/1cd0a08)), closes [#5423](https://github.com/angular/angular-cli/issues/5423)
54+
* **@angular/cli:** new project landing page ([#6144](https://github.com/angular/angular-cli/issues/6144)) ([0ac878a](https://github.com/angular/angular-cli/commit/0ac878a)), closes [#5928](https://github.com/angular/angular-cli/issues/5928) [#6125](https://github.com/angular/angular-cli/issues/6125)
55+
* **@angular/cli:** support inline source maps with defined charset ([ea4c864](https://github.com/angular/angular-cli/commit/ea4c864))
56+
* **@angular/cli:** support TypeScript 2.3 ([69d3d2b](https://github.com/angular/angular-cli/commit/69d3d2b))
57+
* **@angular/cli:** update tslint on updating prefix ([#5908](https://github.com/angular/angular-cli/issues/5908)) ([2bf5c96](https://github.com/angular/angular-cli/commit/2bf5c96)), closes [#5794](https://github.com/angular/angular-cli/issues/5794)
58+
* **@angular/cli:** upgrade the blueprint karma-coverage-istanbul-reporter version ([#5519](https://github.com/angular/angular-cli/issues/5519)) ([d7b46d0](https://github.com/angular/angular-cli/commit/d7b46d0))
59+
* **@angular/cli:** use and support webpack 2.3 ([aa958a6](https://github.com/angular/angular-cli/commit/aa958a6))
60+
* **@angular/cli:** use and support webpack 2.4 ([818936e](https://github.com/angular/angular-cli/commit/818936e))
61+
62+
63+
164
<a name="1.0.3"></a>
265
## [1.0.3](https://github.com/angular/angular-cli/compare/v1.0.2...v1.0.3) (2017-05-09)
366

docs/documentation/build.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,27 @@ Flag | `--dev` | `--prod`
8282
- Replaces `process.env.NODE_ENV` in modules with the `production` value (this is needed for some libraries, like react).
8383
- Runs UglifyJS on the code.
8484

85+
### CSS resources
86+
87+
Resources in CSS, such as images and fonts, will be copied over automatically as part of a build.
88+
If a resource is less than 10kb it will also be inlined.
89+
90+
You'll see these resources be outputted and fingerprinted at the root of `dist/`.
91+
92+
### Service Worker
93+
94+
There is experimental service worker support for production builds available in the CLI.
95+
To enable it, run the following commands:
96+
```
97+
npm install @angular/service-worker --save
98+
ng set apps.0.serviceWorker=true
99+
```
100+
101+
On `--prod` builds a service worker manifest will be created and loaded automatically.
102+
Remember to disable the service worker while developing to avoid stale code.
103+
104+
Note: service worker support is experimental and subject to change.
105+
85106
## Options
86107
<details>
87108
<summary>aot</summary>

docs/documentation/new.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Default applications are created in a directory of the same name, with an initia
1111
<details>
1212
<summary>directory</summary>
1313
<p>
14-
`--directory` (alias: `-dir`) _default value: dir_
14+
<code>--directory</code> (alias: <code>-dir</code>) <em>default value: dir</em>
1515
</p>
1616
<p>
1717
The directory name to create the app in.
@@ -21,7 +21,7 @@ Default applications are created in a directory of the same name, with an initia
2121
<details>
2222
<summary>dry-run</summary>
2323
<p>
24-
`--dry-run` (alias: `-d`) _default value: false_
24+
<code>--dry-run</code> (alias: <code>-d</code>) <em>default value: false</em>
2525
</p>
2626
<p>
2727
Run through without making any changes.
@@ -31,7 +31,7 @@ Default applications are created in a directory of the same name, with an initia
3131
<details>
3232
<summary>inline-style</summary>
3333
<p>
34-
`--inline-style` (alias: `-is`) _default value: false_
34+
<code>--inline-style</code> (alias: <code>-is</code>) <em>default value: false</em>
3535
</p>
3636
<p>
3737
Should have an inline style.
@@ -41,7 +41,7 @@ Default applications are created in a directory of the same name, with an initia
4141
<details>
4242
<summary>inline-template</summary>
4343
<p>
44-
`--inline-template` (alias: `-it`) _default value: false_
44+
<code>--inline-template</code> (alias: <code>-it</code>) <em>default value: false</em>
4545
</p>
4646
<p>
4747
Should have an inline template.
@@ -51,7 +51,7 @@ Default applications are created in a directory of the same name, with an initia
5151
<details>
5252
<summary>prefix</summary>
5353
<p>
54-
`--prefix` (alias: `-p`) _default value: app_
54+
<code>--prefix</code> (alias: <code>-p</code>) <em>default value: app</em>
5555
</p>
5656
<p>
5757
The prefix to use for all component selectors.
@@ -61,7 +61,7 @@ Default applications are created in a directory of the same name, with an initia
6161
<details>
6262
<summary>routing</summary>
6363
<p>
64-
`--routing` _default value: false_
64+
<code>--routing</code> <em>default value: false</em>
6565
</p>
6666
<p>
6767
Generate a routing module.
@@ -71,7 +71,7 @@ Default applications are created in a directory of the same name, with an initia
7171
<details>
7272
<summary>skip-commit</summary>
7373
<p>
74-
`--skip-commit` (alias: `-sc`) _default value: false_
74+
<code>--skip-commit</code> (alias: <code>-sc</code>) <em>default value: false</em>
7575
</p>
7676
<p>
7777
Skip committing the first commit to git.
@@ -81,7 +81,7 @@ Default applications are created in a directory of the same name, with an initia
8181
<details>
8282
<summary>skip-git</summary>
8383
<p>
84-
`--skip-git` (alias: `-sg`) _default value: false_
84+
<code>--skip-git</code> (alias: <code>-sg</code>) <em>default value: false</em>
8585
</p>
8686
<p>
8787
Skip initializing a git repository.
@@ -91,7 +91,7 @@ Default applications are created in a directory of the same name, with an initia
9191
<details>
9292
<summary>skip-install</summary>
9393
<p>
94-
`--skip-install` (alias: `-si`) _default value: false_
94+
<code>--skip-install</code> (alias: <code>-si</code>) <em>default value: false</em>
9595
</p>
9696
<p>
9797
Skip installing packages.
@@ -101,7 +101,7 @@ Default applications are created in a directory of the same name, with an initia
101101
<details>
102102
<summary>skip-tests</summary>
103103
<p>
104-
<code>--skip-tests</code> (aliases: <code>-st</code>) <em>default value: false</em>
104+
<code>--skip-tests (aliases: </code>-st) <em>default value: false</em>
105105
</p>
106106
<p>
107107
Skip creating spec files.
@@ -114,7 +114,7 @@ Default applications are created in a directory of the same name, with an initia
114114
<details>
115115
<summary>source-dir</summary>
116116
<p>
117-
`--source-dir` (alias: `-sd`) _default value: src_
117+
<code>--source-dir</code> (alias: <code>-sd</code>) <em>default value: src</em>
118118
</p>
119119
<p>
120120
The name of the source directory.
@@ -124,7 +124,7 @@ Default applications are created in a directory of the same name, with an initia
124124
<details>
125125
<summary>style</summary>
126126
<p>
127-
`--style` _default value: css_
127+
<code>--style</code> <em>default value: css</em>
128128
</p>
129129
<p>
130130
The style file default extension.
@@ -134,7 +134,7 @@ Default applications are created in a directory of the same name, with an initia
134134
<details>
135135
<summary>verbose</summary>
136136
<p>
137-
`--verbose` (alias: `-v`) _default value: false_
137+
<code>--verbose</code> (alias: <code>-v</code>) <em>default value: false</em>
138138
</p>
139139
<p>
140140
Adds more details to output logging.

docs/documentation/stories.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@
2525
- [Code Coverage](stories/code-coverage)
2626
- [Application Environments](stories/application-environments)
2727
- [Autoprefixer Configuration](stories/autoprefixer)
28+
- [Deploy to GitHub Pages](stories/githug-pages)
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Deploy to GitHub Pages
2+
3+
A simple way to deploy your Angular app is to use
4+
[GitHub Pages](https://help.github.com/articles/what-is-github-pages/).
5+
6+
The first step is to [create a GitHub account](https://github.com/join), and then
7+
[create a repository](https://help.github.com/articles/create-a-repo/) for your project.
8+
Make a note of the user name and project name in GitHub.
9+
10+
Then all you need to do is run `ng build --prod --output-path docs --base-href PROJECT_NAME`, where
11+
`PROJECT_NAME` is the name of your project in GitHub.
12+
Make a copy of `dist/index.html` and name it `dist/404.html`.
13+
14+
Commit your changes and push. On the GitHub project page, configure it to
15+
[publish from the docs folder](https://help.github.com/articles/configuring-a-publishing-source-for-github-pages/#publishing-your-github-pages-site-from-a-docs-folder-on-your-master-branch).
16+
17+
And that's all you need to do! Now you can see your page at
18+
`https://USER_NAME.github.io/PROJECT_NAME/`.
19+
20+
You can also use [angular-cli-ghpages](https://github.com/angular-buch/angular-cli-ghpages), a full
21+
featured package that does this all this for you and has extra functionality.

docs/documentation/stories/global-scripts.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,23 @@ You can also rename the output and lazy load it by using the object format:
2121
{ "input": "pre-rename-script.js", "output": "renamed-script" },
2222
],
2323
```
24+
25+
## Using global libraries inside your app
26+
27+
Once you import a library via the scripts array, you should **not** import it via a import statement
28+
in your TypeScript code (e.g. `import * as $ from 'jquery';`).
29+
If you do that, you'll end up with two different copies of the library: one imported as a
30+
global library, and one imported as a module.
31+
32+
This is especially bad for libraries with plugins, like JQuery, because each copy will have
33+
different plugins.
34+
35+
Instead, download typings for your library (`npm install @types/jquery`) which will give you
36+
access to the global variables exposed by that library.
37+
38+
If the global library you need to use does not have global typings, you can also declare them
39+
manually in `src/typings.d.ts` as `any`:
40+
41+
```
42+
declare var libraryName: any;
43+
```

docs/documentation/stories/using-corporate-proxy.md

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

33
# Using corporate proxy
44

5-
If you work behind a corporate proxy, the regular [backend proxy](http://github.com/angular/angular-cli#proxy-to-backend) configuration will not work if you try to proxy calls to any URL outside your local network.
5+
If you work behind a corporate proxy, the regular [backend proxy](https://github.com/angular/angular-cli/wiki/stories-proxy) configuration will not work if you try to proxy calls to any URL outside your local network.
66

77
In this case, you can configure the backend proxy to redirect calls through your corporate proxy using an agent:
88

packages/@angular/cli/blueprints/ng/files/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
"@angular/core": "^4.0.0",
1919
"@angular/forms": "^4.0.0",
2020
"@angular/http": "^4.0.0",
21-
"@angular/language-service": "^4.0.0",
2221
"@angular/platform-browser": "^4.0.0",
2322
"@angular/platform-browser-dynamic": "^4.0.0",
2423
"@angular/router": "^4.0.0",

packages/@angular/cli/models/webpack-configs/common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export function getCommonConfig(wco: WebpackConfigOptions) {
6767
devtool: buildOptions.sourcemaps ? 'source-map' : false,
6868
resolve: {
6969
extensions: ['.ts', '.js'],
70-
modules: [nodeModules],
70+
modules: ['node_modules', nodeModules],
7171
},
7272
resolveLoader: {
7373
modules: [nodeModules]

packages/@angular/cli/tasks/serve.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,8 @@ export default Task.extend({
177177
// set publicPath property to be sent on webpack server config
178178
if (serveTaskOptions.deployUrl) {
179179
webpackDevServerConfiguration.publicPath = serveTaskOptions.deployUrl;
180+
(webpackDevServerConfiguration.historyApiFallback as any).index =
181+
serveTaskOptions.deployUrl + `/${appConfig.index}`;
180182
}
181183

182184
if (serveTaskOptions.target === 'production') {

scripts/test-commit-messages.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,12 @@ execSync('git fetch origin');
3636
// Travis doesn't have master when running jobs on other branches (minor/patch/etc).
3737
execSync('git fetch origin master:master');
3838

39+
// Get PR target branch, default to master for running locally.
40+
const currentBranch = process.env.TRAVIS_BRANCH
41+
|| process.env.APPVEYOR_REPO_BRANCH
42+
|| 'master';
3943

40-
const output = execSync('git log master.. --reverse --format="%H %s" --no-merges', {
44+
const output = execSync('git log ' + currentBranch + '..HEAD --reverse --format="%H %s" --no-merges', {
4145
encoding: 'utf-8'
4246
});
4347

tests/e2e/tests/misc/deploy-url.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
import { killAllProcesses } from '../../utils/process';
22
import { request } from '../../utils/http';
3-
import { expectToFail } from '../../utils/utils';
43
import { ngServe } from '../../utils/project';
54

65
export default function () {
76
return Promise.resolve()
87
// check when setup through command line arguments
9-
.then(() => ngServe('--deploy-url', '/deployurl', '--base-href', '/deployurl'))
10-
.then(() => expectToFail(() => request('http://localhost:4200')))
11-
.then(() => request('http://localhost:4200/deployurl'))
8+
.then(() => ngServe('--deploy-url', '/deployurl/', '--base-href', '/deployurl/'))
9+
.then(() => request('http://localhost:4200'))
10+
.then(body => {
11+
if (!body.match(/<app-root><\/app-root>/)) {
12+
throw new Error('Response does not match expected value.');
13+
}
14+
})
15+
.then(() => request('http://localhost:4200/deployurl/'))
1216
.then(body => {
1317
if (!body.match(/<app-root><\/app-root>/)) {
1418
throw new Error('Response does not match expected value.');
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { appendToFile, prependToFile } from '../../utils/fs';
2+
import { ng, silentNpm } from '../../utils/process';
3+
4+
5+
export default async function () {
6+
await silentNpm('install', '[email protected]');
7+
8+
await prependToFile('src/app/app.module.ts', 'import * as firebase from \'firebase\';');
9+
await appendToFile('src/app/app.module.ts', 'firebase.initializeApp({});');
10+
11+
await ng('build');
12+
await ng('build', '--aot');
13+
}

0 commit comments

Comments
 (0)