Skip to content

Commit 61b4b23

Browse files
committed
updating the master with upstream
2 parents fda89ed + c935039 commit 61b4b23

File tree

261 files changed

+5363
-2925
lines changed

Some content is hidden

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

261 files changed

+5363
-2925
lines changed

.appveyor.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ environment:
33
- nodejs_version: "5.0"
44
- nodejs_version: "6.0"
55

6+
matrix:
7+
fast_finish: true
8+
69
install:
710
- ps: Install-Product node $env:nodejs_version
811
- npm install
@@ -11,5 +14,6 @@ test_script:
1114
- node --version
1215
- npm --version
1316
- npm test
17+
- node tests\e2e_runner.js
1418

1519
build: off

.eslintignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# /node_modules and /bower_components ignored by default
2+
dist/
23
.git/
34
tmp/
45
typings/
56

67
# Ignore all blueprint files. We e2e tests those later on.
7-
addon/ng2/blueprints/*/files/
8+
packages/angular-cli/blueprints/*/files/

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
dist/
12
node_modules/
2-
npm-debug.log
3+
npm-debug.log*
34

45
# IDEs
56
.idea/
67
jsconfig.json
8+
.vscode/
79

810
# Typings file.
911
typings/

.travis.yml

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,43 @@ env:
1212
- DBUS_SESSION_BUS_ADDRESS=/dev/null
1313
matrix:
1414
- SCRIPT=lint
15+
- SCRIPT=build
1516
- SCRIPT=test
17+
- NODE_SCRIPT=tests/e2e_runner.js
18+
- NODE_SCRIPT="tests/e2e_runner.js --nightly"
1619
# - TARGET=mobile SCRIPT=mobile_test
1720
matrix:
21+
fast_finish: true
22+
allow_failures:
23+
- os: osx
24+
- env: NODE_SCRIPT="tests/e2e_runner.js --nightly"
1825
exclude:
1926
- node_js: "6"
2027
env: SCRIPT=lint
28+
- os: osx
29+
env: NODE_SCRIPT="tests/e2e_runner.js --nightly"
30+
- node_js: "6"
31+
env: NODE_SCRIPT="tests/e2e_runner.js --nightly"
2132
- os: osx
2233
node_js: "5"
2334
env: SCRIPT=lint
24-
# - os: osx
25-
# env: TARGET=mobile SCRIPT=mobile_test
35+
- node_js: "6"
36+
env: SCRIPT=build
37+
- os: osx
38+
node_js: "5"
39+
env: SCRIPT=build
40+
- os: osx
41+
env: TARGET=mobile SCRIPT=mobile_test
2642

2743
before_install:
2844
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
2945
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew tap caskroom/cask; fi
3046
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew cask install google-chrome --force; fi
47+
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then mkdir ~/.config && echo "--no-sandbox" > ~/.config/chrome-flags.conf; fi
3148
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export DISPLAY=:99.0; fi
3249
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sh -e /etc/init.d/xvfb start; fi
3350
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export CHROME_BIN=chromium-browser; fi
51+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo "--no-sandbox" > ~/.config/chromium-flags.conf; fi
3452
- if [[ "$TARGET" == "mobile" ]]; then export MOBILE_TEST=true; fi
3553
- npm config set spin false
3654
- npm config set progress false
@@ -39,4 +57,5 @@ install:
3957
- npm install --no-optional
4058

4159
script:
42-
- npm run-script $SCRIPT
60+
- if [[ "$SCRIPT" ]]; then npm run-script $SCRIPT; fi
61+
- if [[ "$NODE_SCRIPT" ]]; then node $NODE_SCRIPT; fi

CHANGELOG.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,72 @@
1+
<a name="1.0.0-beta.14"></a>
2+
# [1.0.0-beta.14](https://github.com/angular/angular-cli/compare/v1.0.0-beta.11-webpack.2...v1.0.0-beta.14) (2016-09-15)
3+
4+
5+
### Bug Fixes
6+
7+
* **config:** change css regex which causes error ([#2069](https://github.com/angular/angular-cli/issues/2069)) ([7096cc9](https://github.com/angular/angular-cli/commit/7096cc9)), closes [angular/angular#11445](https://github.com/angular/angular/issues/11445)
8+
* **init:** fix link and npm install ([#2086](https://github.com/angular/angular-cli/issues/2086)) ([7a39162](https://github.com/angular/angular-cli/commit/7a39162))
9+
10+
11+
12+
<a name="1.0.0-beta.11-webpack.9"></a>
13+
# [1.0.0-beta.11-webpack.9](https://github.com/angular/angular-cli/compare/v1.0.0-beta.11-webpack.2...v1.0.0-beta.11-webpack.9) (2016-09-13)
14+
15+
16+
### Bug Fixes
17+
18+
* add ast-tools as a direct dependency to angular-cli ([bf18f4d](https://github.com/angular/angular-cli/commit/bf18f4d))
19+
* **bootstrap:** fix windows node_modules path ([#2037](https://github.com/angular/angular-cli/issues/2037)) ([c41600a](https://github.com/angular/angular-cli/commit/c41600a))
20+
* **find-lazy-modules:** Allow for any valid keys/value to be used ([#1987](https://github.com/angular/angular-cli/issues/1987)) ([caa3142](https://github.com/angular/angular-cli/commit/caa3142)), closes [#1891](https://github.com/angular/angular-cli/issues/1891) [#1960](https://github.com/angular/angular-cli/issues/1960)
21+
* **lint:** Updated the main.ts's blueprint to fix the ng lint failure ([#1903](https://github.com/angular/angular-cli/issues/1903)) ([#1904](https://github.com/angular/angular-cli/issues/1904)) ([0d9d646](https://github.com/angular/angular-cli/commit/0d9d646))
22+
* add loader for gif ([#2066](https://github.com/angular/angular-cli/issues/2066)) ([126c82b](https://github.com/angular/angular-cli/commit/126c82b)), closes [#1878](https://github.com/angular/angular-cli/issues/1878)
23+
* lazy loading now works as expected with latest webpack ([#2038](https://github.com/angular/angular-cli/issues/2038)) ([33c9c73](https://github.com/angular/angular-cli/commit/33c9c73))
24+
* **test:** add build environment to karma ([#2074](https://github.com/angular/angular-cli/issues/2074)) ([b6a2165](https://github.com/angular/angular-cli/commit/b6a2165))
25+
26+
27+
### Features
28+
29+
* **module:** add ability to generate a routing file for new modules ([#1971](https://github.com/angular/angular-cli/issues/1971)) ([9ddba69](https://github.com/angular/angular-cli/commit/9ddba69))
30+
* **module:** select module to add generations to for declaration ([#1966](https://github.com/angular/angular-cli/issues/1966)) ([a647e51](https://github.com/angular/angular-cli/commit/a647e51))
31+
32+
33+
34+
<a name="1.0.0-beta.11-webpack.3"></a>
35+
# [1.0.0-beta.11-webpack.3](https://github.com/angular/angular-cli/compare/v1.0.0-beta.11-webpack.2...v1.0.0-beta.11-webpack.3) (2016-08-29)
36+
37+
38+
### Bug Fixes
39+
40+
* **lint:** change " to ' ([#1779](https://github.com/angular/angular-cli/issues/1779)) ([e572bb4](https://github.com/angular/angular-cli/commit/e572bb4))
41+
* change inline-source-map to source-map for dev and common, prod already supports ([#1659](https://github.com/angular/angular-cli/issues/1659)) ([e0454e3](https://github.com/angular/angular-cli/commit/e0454e3))
42+
* **test:** use updated ngModules in blueprint ([#1680](https://github.com/angular/angular-cli/issues/1680)) ([cb67d25](https://github.com/angular/angular-cli/commit/cb67d25))
43+
* denodeify is needed in prod now too ([#1879](https://github.com/angular/angular-cli/issues/1879)) ([5e68151](https://github.com/angular/angular-cli/commit/5e68151))
44+
* **build:** copy dot files in assets ([8c566ca](https://github.com/angular/angular-cli/commit/8c566ca)), closes [#1758](https://github.com/angular/angular-cli/issues/1758) [#1847](https://github.com/angular/angular-cli/issues/1847)
45+
* fix compilation errors for the whole project ([#1864](https://github.com/angular/angular-cli/issues/1864)) ([8be7096](https://github.com/angular/angular-cli/commit/8be7096))
46+
* **config:** misnamed variable causing errors. ([e9ea554](https://github.com/angular/angular-cli/commit/e9ea554))
47+
* **generate:** use canonical paths for template and style URLs ([339af33](https://github.com/angular/angular-cli/commit/339af33)), closes [#1840](https://github.com/angular/angular-cli/issues/1840)
48+
* **init:** karma paths reflect sourceDir config ([#1686](https://github.com/angular/angular-cli/issues/1686)) ([504a497](https://github.com/angular/angular-cli/commit/504a497)), closes [#1683](https://github.com/angular/angular-cli/issues/1683)
49+
* **mobile:** add `icons/` path in front of icon `src` values ([cc5e9ad](https://github.com/angular/angular-cli/commit/cc5e9ad)), closes [#1179](https://github.com/angular/angular-cli/issues/1179) [#1181](https://github.com/angular/angular-cli/issues/1181)
50+
* **mobile:** remove icon `density` field from manifest ([382487b](https://github.com/angular/angular-cli/commit/382487b)), closes [#1178](https://github.com/angular/angular-cli/issues/1178) [#1180](https://github.com/angular/angular-cli/issues/1180)
51+
* **prod:** fix function name mangling ([9188ea2](https://github.com/angular/angular-cli/commit/9188ea2)), closes [#1644](https://github.com/angular/angular-cli/issues/1644) [#1644](https://github.com/angular/angular-cli/issues/1644) [#1662](https://github.com/angular/angular-cli/issues/1662)
52+
* improve 'ember'->'ng' replacement ([80512ba](https://github.com/angular/angular-cli/commit/80512ba)), closes [#1405](https://github.com/angular/angular-cli/issues/1405) [#1829](https://github.com/angular/angular-cli/issues/1829)
53+
* removed travis-specific configuration from karma ([#1815](https://github.com/angular/angular-cli/issues/1815)) ([f03f275](https://github.com/angular/angular-cli/commit/f03f275))
54+
55+
56+
### Features
57+
58+
* add features in get-dependent-files.ts ([#1525](https://github.com/angular/angular-cli/issues/1525)) ([7565f2d](https://github.com/angular/angular-cli/commit/7565f2d))
59+
* Add LCOV reporting by default in karma remap instanbul reporter ([#1657](https://github.com/angular/angular-cli/issues/1657)) ([10dd465](https://github.com/angular/angular-cli/commit/10dd465))
60+
* **build:** implement --base-href argument ([74b29b3](https://github.com/angular/angular-cli/commit/74b29b3)), closes [#1064](https://github.com/angular/angular-cli/issues/1064) [#1506](https://github.com/angular/angular-cli/issues/1506)
61+
* **build:** silence sourcemap warnings for vendors ([#1673](https://github.com/angular/angular-cli/issues/1673)) ([67098e0](https://github.com/angular/angular-cli/commit/67098e0))
62+
* **build:** update angular-cli.json ([#1633](https://github.com/angular/angular-cli/issues/1633)) ([3dcd49b](https://github.com/angular/angular-cli/commit/3dcd49b))
63+
* **feature:** add ability to generate feature modules ([#1867](https://github.com/angular/angular-cli/issues/1867)) ([1f4c6fe](https://github.com/angular/angular-cli/commit/1f4c6fe))
64+
* **module:** add generation of modules ([f40e6f1](https://github.com/angular/angular-cli/commit/f40e6f1)), closes [#1650](https://github.com/angular/angular-cli/issues/1650)
65+
* **serve:** add proxy support ([9d69748](https://github.com/angular/angular-cli/commit/9d69748))
66+
* **tslint:** add validation for selector prefix ([9ff8c09](https://github.com/angular/angular-cli/commit/9ff8c09)), closes [#1565](https://github.com/angular/angular-cli/issues/1565)
67+
68+
69+
170
<a name="1.0.0-beta.11-webpack.2"></a>
271
# [1.0.0-beta.11-webpack.2](https://github.com/angular/angular-cli/compare/v1.0.0-beta.10-webpack...v1.0.0-beta.11-webpack.2) (2016-08-10)
372

README.md

Lines changed: 73 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ This project is very much still a work in progress.
1616
The CLI is now in beta.
1717
If you wish to collaborate while the project is still young, check out [our issue list](https://github.com/angular/angular-cli/issues).
1818

19-
## Webpack preview release update
19+
## Webpack update
2020

21-
We're updating the build system in Angular-CLI to use webpack instead of Broccoli.
21+
We changed the build system between beta.10 and beta.12, from SystemJS to Webpack.
22+
And with it comes a lot of benefits.
23+
To take advantage of these, your app built with the old beta will need to migrate.
2224

23-
You can install and update your projects using [these instructions](https://github.com/angular/angular-cli/blob/master/WEBPACK_UPDATE.md).
24-
25-
**The current instructions on this file reflect usage for the `webpack` version.**
25+
You can update your `beta.10` projects to `beta.12` by following [these instructions](https://github.com/angular/angular-cli/wiki/Upgrading-from-Beta.10-to-Beta.14).
2626

2727
## Prerequisites
2828

29-
The generated project has dependencies that require **Node 4 or greater**.
29+
The generated project has dependencies that require **Node 4.x.x and NPM 3.x.x**.
3030

3131
## Table of Contents
3232

@@ -37,6 +37,7 @@ The generated project has dependencies that require **Node 4 or greater**.
3737
* [Generating a Route](#generating-a-route)
3838
* [Creating a Build](#creating-a-build)
3939
* [Build Targets and Environment Files](#build-targets-and-environment-files)
40+
* [Base tag handling in index.html](#base-tag-handling-in-indexhtml)
4041
* [Adding extra files to the build](#adding-extra-files-to-the-build)
4142
* [Running Unit Tests](#running-unit-tests)
4243
* [Running End-to-End Tests](#running-end-to-end-tests)
@@ -47,6 +48,7 @@ The generated project has dependencies that require **Node 4 or greater**.
4748
* [Global styles](#global-styles)
4849
* [CSS preprocessor integration](#css-preprocessor-integration)
4950
* [3rd Party Library Installation](#3rd-party-library-installation)
51+
* [Global Library Installation](#global-library-installation)
5052
* [Updating angular-cli](#updating-angular-cli)
5153
* [Known Issues](#known-issues)
5254
* [Development Hints for hacking on angular-cli](#development-hints-for-hacking-on-angular-cli)
@@ -76,7 +78,7 @@ Navigate to `http://localhost:4200/`. The app will automatically reload if you c
7678
You can configure the default HTTP port and the one used by the LiveReload server with two command-line options :
7779

7880
```bash
79-
ng serve --port 4201 --live-reload-port 49153
81+
ng serve --host 0.0.0.0 --port 4201 --live-reload-port 49153
8082
```
8183

8284
### Generating Components, Directives, Pipes and Services
@@ -123,13 +125,19 @@ The build artifacts will be stored in the `dist/` directory.
123125

124126
### Build Targets and Environment Files
125127

126-
A build can specify both a build target (`development` or `production`) and an
127-
environment file to be used with that build. By default, the development build
128-
target is used.
128+
`ng build` can specify both a build target (`--target=production` or `--target=development`) and an
129+
environment file to be used with that build (`--environment=dev` or `--environment=prod`).
130+
By default, the development build target and environment are used.
129131

130-
At build time, `src/environments/environment.ts` will be replaced by
131-
`src/environments/environment.NAME.ts` where `NAME` is the argument
132-
provided to the `--environment` flag.
132+
The mapping used to determine which environment file is used can be found in `angular-cli.json`:
133+
134+
```
135+
"environments": {
136+
"source": "environments/environment.ts",
137+
"dev": "environments/environment.ts",
138+
"prod": "environments/environment.prod.ts"
139+
}
140+
```
133141

134142
These options also apply to the serve command. If you do not pass a value for `environment`,
135143
it will default to `dev` for `development` and `prod` for `production`.
@@ -148,8 +156,18 @@ ng build
148156

149157
You can also add your own env files other than `dev` and `prod` by doing the following:
150158
- create a `src/environments/environment.NAME.ts`
151-
- add `{ NAME: 'src/environments/environment.NAME.ts' }` to the the `apps[0].environments` object in `angular-cli.json`
152-
- use them by using the `--env=NAME` flag on the build/serve commands.
159+
- add `{ "NAME": 'src/environments/environment.NAME.ts' }` to the the `apps[0].environments` object in `angular-cli.json`
160+
- use them via the `--env=NAME` flag on the build/serve commands.
161+
162+
### Base tag handling in index.html
163+
164+
When building you can modify base tag (`<base href="/">`) in your index.html with `--base-href your-url` option.
165+
166+
```bash
167+
# Sets base tag href to /myUrl/ in your index.html
168+
ng build --base-href /myUrl/
169+
ng build --bh /myUrl/
170+
```
153171

154172
### Bundling
155173

@@ -250,12 +268,13 @@ The `styles.css` file allows users to add global styles and supports
250268
If the project is created with the `--style=sass` option, this will be a `.sass`
251269
file instead, and the same applies to `scss/less/styl`.
252270

271+
You can add more global styles via the `apps[0].styles` property in `angular-cli.json`.
272+
253273
### CSS Preprocessor integration
254274

255275
Angular-CLI supports all major CSS preprocessors:
256276
- sass/scss ([http://sass-lang.com/](http://sass-lang.com/))
257277
- less ([http://lesscss.org/](http://lesscss.org/))
258-
- compass ([http://compass-style.org/](http://compass-style.org/))
259278
- stylus ([http://stylus-lang.com/](http://stylus-lang.com/))
260279

261280
To use these prepocessors simply add the file to your component's `styleUrls`:
@@ -291,10 +310,46 @@ Simply install your library via `npm install lib-name --save` and import it in y
291310
If the library does not include typings, you can install them using npm:
292311

293312
```bash
294-
npm install moment --save
295-
npm install @types/moment --save-dev
313+
npm install d3 --save
314+
npm install @types/d3 --save-dev
315+
```
316+
317+
### Global Library Installation
318+
319+
Some javascript libraries need to be added to the global scope, and loaded as if
320+
they were in a script tag. We can do this using the `apps[0].scripts` and
321+
`apps[0].styles` properties of `angular-cli.json`.
322+
323+
As an example, to use [Boostrap 4](http://v4-alpha.getbootstrap.com/) this is
324+
what you need to do:
325+
326+
First install Bootstrap from `npm`:
327+
328+
```bash
329+
npm install bootstrap@next
296330
```
297331

332+
Then add the needed script files to to `apps[0].scripts`.
333+
334+
```
335+
"scripts": [
336+
"../node_modules/jquery/dist/jquery.js",
337+
"../node_modules/tether/dist/js/tether.js",
338+
"../node_modules/bootstrap/dist/js/bootstrap.js"
339+
],
340+
```
341+
342+
Finally add the Bootstrap CSS to the `apps[0].styles` array:
343+
```
344+
"styles": [
345+
"styles.css",
346+
"../node_modules/bootstrap/dist/css/bootstrap.css"
347+
],
348+
```
349+
350+
Restart `ng serve` if you're running it, and Bootstrap 4 should be working on
351+
your app.
352+
298353
### Updating angular-cli
299354

300355
To update `angular-cli` to a new version, you must update both the global package and your project's local package.

0 commit comments

Comments
 (0)