Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
3cf60a8
Fixed the ssl command not working anymore
Sep 20, 2016
7fb5fb1
Fixes lint
Sep 20, 2016
745be76
fix(karma): set defaults for karma.conf.js (#1837)
JSMike Sep 21, 2016
04afb8f
fix(generate): Update directive.spec.ts blueprint to fix incorret imp…
andrelmp Sep 22, 2016
7e9e519
Trim trailing whitespace (#2345)
zalog Sep 25, 2016
015dbbb
feat(webpackDevServer): Add watchOptions for webpackDevServer (#1814)
JSMike Sep 26, 2016
8e5918f
chore(docs): proxy-config documentation
leon Aug 30, 2016
25fc7bb
chore(docs): fixed typo
btroncone Sep 17, 2016
acc8a6d
chore(readme): update Bootstrap CSS inclusion example
peterblazejewicz Sep 17, 2016
fb9e311
chore(readme): fix webpack update version typo
dzonatan Sep 18, 2016
e8af222
bug(generate): directive selectors are now camelCase
Brocco Sep 24, 2016
ef4d1ea
chore(e2e): bump to protractor 4.0.9
cexbrayat Sep 24, 2016
26f916a
fix(build): fail ng build on error (#2360)
filipesilva Sep 26, 2016
32cd7a2
chore(generate): update routing files & add --routing to ng new (#2361)
Brocco Sep 27, 2016
e8a5185
chore(build): update node-zopfli (#2365)
filipesilva Sep 27, 2016
32839bb
fix(build): use config output path as default (#2158)
filipesilva Sep 27, 2016
b610c8e
chore(test): add failing build test (#2366)
filipesilva Sep 27, 2016
3aff7ad
fix(test): correctly report packages spec failures (#2238)
filipesilva Sep 27, 2016
4d3be08
feature(compiler): add support for AoT to the CLI. (#2333)
hansl Sep 28, 2016
82589b5
1.0.0-beta.16
hansl Sep 28, 2016
a8a07ee
chore(npm): updated webpack version and config cleanup (#2237)
TheLarkInn Sep 28, 2016
73c9b7c
chore(new): use tilde versions for @angular (#2387)
filipesilva Sep 28, 2016
e10ca53
feat(template): issue template look better (#2384)
clemens-tolboom Sep 28, 2016
5aa9cf0
fix(typo): fixed typo in README (#2383)
suhasdeshpande Sep 28, 2016
8b0f4d4
fix(generate): use prefix when initializing app (#2046) (#2367)
Gelio Sep 28, 2016
24a791d
feature(route): allow lazy route reference by relative paths (#2434)
Brocco Sep 30, 2016
4027980
bug(route): fix the class names for --routing in ng new (#2435)
Brocco Sep 30, 2016
61f266a
feature(new): allow specification of --inline-style & --inline-templa…
Brocco Oct 1, 2016
2a562b6
feature(config): config inline template & style in angular-cli.json (…
Brocco Oct 1, 2016
556fe56
chore(new): remove blueprint option (#2390)
filipesilva Oct 2, 2016
43f1fda
fix(build): use baseUrl and paths from tsconfig (#2470)
filipesilva Oct 2, 2016
6d8a7e2
chore(completion): ng completion update for command options (#2379)
catull Oct 2, 2016
986f89f
chore(ci): use node 4 instead of 5 (#2469)
filipesilva Oct 2, 2016
f8ef300
feat(aot): creating files in a virtual fs. (#2464)
hansl Oct 2, 2016
237dc1e
Fixed the ssl command not working anymore
Sep 20, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
environment:
matrix:
- nodejs_version: "5.0"
- nodejs_version: "4.0"
- nodejs_version: "6.0"

matrix:
fast_finish: true

install:
- ps: Install-Product node $env:nodejs_version
- npm install -g npm
- npm install

test_script:
Expand Down
17 changes: 9 additions & 8 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
> Please provide us with the following information:
> ---------------------------------------------------------------

1. OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
### OS?
> Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)


2. Versions. Please run `ng --version`. If there's nothing outputted, please run
in a Terminal: `node --version` and paste the result here:
### Versions.
> Please run `ng --version`. If there's nothing outputted, please run in a Terminal: `node --version` and paste the result here:


3. Repro steps. Was this an app that wasn't created using the CLI? What change did you
do on your code? etc.
### Repro steps.
> Was this an app that wasn't created using the CLI? What change did you do on your code? etc.


4. The log given by the failure. Normally this include a stack trace and some
more information.
### The log given by the failure.
> Normally this include a stack trace and some more information.


5. Mention any other details that might be useful.
### Mention any other details that might be useful.

> ---------------------------------------------------------------
> Thanks! We'll be in touch soon.
42 changes: 25 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ dist: trusty
sudo: required
language: node_js
node_js:
- "5"
- "6"
- "4"
os:
- linux
- osx
env:
global:
- DBUS_SESSION_BUS_ADDRESS=/dev/null
Expand All @@ -20,25 +18,34 @@ env:
matrix:
fast_finish: true
allow_failures:
- node_js: "5"
- os: osx
- env: NODE_SCRIPT="tests/e2e_runner.js --nightly"
exclude:
include:
- node_js: "5"
os: linux
env: SCRIPT=test
- node_js: "5"
os: linux
env: NODE_SCRIPT=tests/e2e_runner.js
- node_js: "6"
env: SCRIPT=lint
- os: osx
env: NODE_SCRIPT="tests/e2e_runner.js --nightly"
os: linux
env: SCRIPT=test
- node_js: "6"
env: NODE_SCRIPT="tests/e2e_runner.js --nightly"
- os: osx
node_js: "5"
env: SCRIPT=lint
os: linux
env: NODE_SCRIPT=tests/e2e_runner.js
- node_js: "4"
os: osx
env: SCRIPT=test
- node_js: "4"
os: osx
env: NODE_SCRIPT=tests/e2e_runner.js
- node_js: "6"
env: SCRIPT=build
- os: osx
node_js: "5"
env: SCRIPT=build
- os: osx
env: TARGET=mobile SCRIPT=mobile_test
os: osx
env: SCRIPT=test
- node_js: "6"
os: osx
env: NODE_SCRIPT=tests/e2e_runner.js

before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
Expand All @@ -50,6 +57,7 @@ before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export CHROME_BIN=chromium-browser; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo "--no-sandbox" > ~/.config/chromium-flags.conf; fi
- if [[ "$TARGET" == "mobile" ]]; then export MOBILE_TEST=true; fi
- npm install -g npm
- npm config set spin false
- npm config set progress false

Expand Down
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
<a name="1.0.0-beta.16"></a>
# [1.0.0-beta.16](https://github.com/angular/angular-cli/compare/v1.0.0-beta.15...v1.0.0-beta.16) (2016-09-28)


### Bug Fixes

* **build:** fail ng build on error ([#2360](https://github.com/angular/angular-cli/issues/2360)) ([aa48c30](https://github.com/angular/angular-cli/commit/aa48c30)), closes [#2014](https://github.com/angular/angular-cli/issues/2014)
* **build:** use config output path as default ([#2158](https://github.com/angular/angular-cli/issues/2158)) ([49a120b](https://github.com/angular/angular-cli/commit/49a120b))
* **generate:** Update directive.spec.ts blueprint to fix incorret import ([#1940](https://github.com/angular/angular-cli/issues/1940)) ([93da512](https://github.com/angular/angular-cli/commit/93da512))
* **karma:** set defaults for karma.conf.js ([#1837](https://github.com/angular/angular-cli/issues/1837)) ([e2e94a5](https://github.com/angular/angular-cli/commit/e2e94a5))
* **test:** correctly report packages spec failures ([#2238](https://github.com/angular/angular-cli/issues/2238)) ([3102453](https://github.com/angular/angular-cli/commit/3102453))


### Features

* **webpackDevServer:** Add watchOptions for webpackDevServer ([#1814](https://github.com/angular/angular-cli/issues/1814)) ([ce03088](https://github.com/angular/angular-cli/commit/ce03088))



<a name="1.0.0-beta.15"></a>
# [1.0.0-beta.15](https://github.com/angular/angular-cli/compare/v1.0.0-beta.14...v1.0.0-beta.15) (2016-09-20)

Expand Down
71 changes: 50 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ Prototype of a CLI for Angular 2 applications based on the [ember-cli](http://ww

This project is very much still a work in progress.

The CLI is now in beta.
The CLI is now in beta.
If you wish to collaborate while the project is still young, check out [our issue list](https://github.com/angular/angular-cli/issues).

## Webpack update

We changed the build system between beta.10 and beta.12, from SystemJS to Webpack.
And with it comes a lot of benefits.
We changed the build system between beta.10 and beta.14, from SystemJS to Webpack.
And with it comes a lot of benefits.
To take advantage of these, your app built with the old beta will need to migrate.

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).
You can update your `beta.10` projects to `beta.14` by following [these instructions](https://github.com/angular/angular-cli/wiki/Upgrading-from-Beta.10-to-Beta.14).

## Prerequisites

Expand All @@ -41,6 +41,7 @@ The generated project has dependencies that require **Node 4.x.x and NPM 3.x.x**
* [Adding extra files to the build](#adding-extra-files-to-the-build)
* [Running Unit Tests](#running-unit-tests)
* [Running End-to-End Tests](#running-end-to-end-tests)
* [Proxy To Backend](#proxy-to-backend)
* [Deploying the App via GitHub Pages](#deploying-the-app-via-github-pages)
* [Linting and formatting code](#linting-and-formatting-code)
* [Support for offline applications](#support-for-offline-applications)
Expand Down Expand Up @@ -108,6 +109,7 @@ Service | `ng g service my-new-service`
Class | `ng g class my-new-class`
Interface | `ng g interface my-new-interface`
Enum | `ng g enum my-new-enum`
Module | `ng g module my-module`

### Generating a route

Expand All @@ -125,8 +127,8 @@ The build artifacts will be stored in the `dist/` directory.

### Build Targets and Environment Files

`ng build` can specify both a build target (`--target=production` or `--target=development`) and an
environment file to be used with that build (`--environment=dev` or `--environment=prod`).
`ng build` can specify both a build target (`--target=production` or `--target=development`) and an
environment file to be used with that build (`--environment=dev` or `--environment=prod`).
By default, the development build target and environment are used.

The mapping used to determine which environment file is used can be found in `angular-cli.json`:
Expand Down Expand Up @@ -156,7 +158,7 @@ ng build

You can also add your own env files other than `dev` and `prod` by doing the following:
- create a `src/environments/environment.NAME.ts`
- add `{ "NAME": 'src/environments/environment.NAME.ts' }` to the the `apps[0].environments` object in `angular-cli.json`
- add `{ "NAME": 'src/environments/environment.NAME.ts' }` to the the `apps[0].environments` object in `angular-cli.json`
- use them via the `--env=NAME` flag on the build/serve commands.

### Base tag handling in index.html
Expand All @@ -171,7 +173,7 @@ ng build --bh /myUrl/

### Bundling

All builds make use of bundling, and using the `--prod` flag in `ng build --prod`
All builds make use of bundling, and using the `--prod` flag in `ng build --prod`
or `ng serve --prod` will also make use of uglifying and tree-shaking functionality.

### Running unit tests
Expand All @@ -192,6 +194,33 @@ Before running the tests make sure you are serving the app via `ng serve`.

End-to-end tests are run via [Protractor](https://angular.github.io/protractor/).

### Proxy To Backend
Using the proxying support in webpack's dev server we can highjack certain urls and send them to a backend server.
We do this by passing a file to `--proxy-config`

Say we have a server running on `http://localhost:3000/api` and we want all calls th `http://localhost:4200/api` to go to that server.

We create a file next to projects `package.json` called `proxy.conf.json`
with the content

```
{
"/api": {
"target": "http://localhost:3000",
"secure": false
}
}
```

You can read more about what options are available here [webpack-dev-server proxy settings](https://webpack.github.io/docs/webpack-dev-server.html#proxy)

and then we edit the `package.json` file's start script to be

```
"start": "ng serve --proxy-config proxy.conf.json",
```

now run it with `npm start`

### Deploying the app via GitHub Pages

Expand Down Expand Up @@ -262,11 +291,11 @@ source ~/.bash_profile

### Global styles

The `styles.css` file allows users to add global styles and supports
[CSS imports](https://developer.mozilla.org/en/docs/Web/CSS/@import).
The `styles.css` file allows users to add global styles and supports
[CSS imports](https://developer.mozilla.org/en/docs/Web/CSS/@import).

If the project is created with the `--style=sass` option, this will be a `.sass`
file instead, and the same applies to `scss/less/styl`.
If the project is created with the `--style=sass` option, this will be a `.sass`
file instead, and the same applies to `scss/less/styl`.

You can add more global styles via the `apps[0].styles` property in `angular-cli.json`.

Expand All @@ -290,7 +319,7 @@ export class AppComponent {
}
```

When generating a new project you can also define which extention you want for
When generating a new project you can also define which extension you want for
style files:

```bash
Expand All @@ -316,11 +345,11 @@ npm install @types/d3 --save-dev

### Global Library Installation

Some javascript libraries need to be added to the global scope, and loaded as if
they were in a script tag. We can do this using the `apps[0].scripts` and
Some javascript libraries need to be added to the global scope, and loaded as if
they were in a script tag. We can do this using the `apps[0].scripts` and
`apps[0].styles` properties of `angular-cli.json`.

As an example, to use [Boostrap 4](http://v4-alpha.getbootstrap.com/) this is
As an example, to use [Boostrap 4](http://v4-alpha.getbootstrap.com/) this is
what you need to do:

First install Bootstrap from `npm`:
Expand All @@ -329,7 +358,7 @@ First install Bootstrap from `npm`:
npm install bootstrap@next
```

Then add the needed script files to to `apps[0].scripts`.
Then add the needed script files to `apps[0].scripts`:

```
"scripts": [
Expand All @@ -342,12 +371,12 @@ Then add the needed script files to to `apps[0].scripts`.
Finally add the Bootstrap CSS to the `apps[0].styles` array:
```
"styles": [
"styles.css",
"../node_modules/bootstrap/dist/css/bootstrap.css"
"../node_modules/bootstrap/dist/css/bootstrap.css",
"styles.css"
],
```

Restart `ng serve` if you're running it, and Bootstrap 4 should be working on
Restart `ng serve` if you're running it, and Bootstrap 4 should be working on
your app.

### Updating angular-cli
Expand All @@ -372,7 +401,7 @@ Running `ng init` will check for changes in all the auto-generated files created

Carefully read the diffs for each code file, and either accept the changes or incorporate them manually after `ng init` finishes.

**The main cause of errors after an update is failing to incorporate these updates into your code**.
**The main cause of errors after an update is failing to incorporate these updates into your code**.

You can find more details about changes between versions in [CHANGELOG.md](https://github.com/angular/angular-cli/blob/master/CHANGELOG.md).

Expand Down
1 change: 1 addition & 0 deletions lib/bootstrap-local.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const ts = require('typescript');


global.angularCliIsLocal = true;
global.angularCliPackages = require('./packages');

const compilerOptions = JSON.parse(fs.readFileSync(path.join(__dirname, '../tsconfig.json')));

Expand Down
5 changes: 4 additions & 1 deletion lib/packages.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ const packages = fs.readdirSync(packageRoot)
.map(pkgName => ({ name: pkgName, root: path.join(packageRoot, pkgName) }))
.filter(pkg => fs.statSync(pkg.root).isDirectory())
.reduce((packages, pkg) => {
let name = pkg == 'angular-cli' ? 'angular-cli' : `@angular-cli/${pkg.name}`;
let pkgJson = JSON.parse(fs.readFileSync(path.join(pkg.root, 'package.json'), 'utf8'));
let name = pkgJson['name'];
packages[name] = {
dist: path.join(__dirname, '../dist', pkg.name),
packageJson: path.join(pkg.root, 'package.json'),
root: pkg.root,
main: path.resolve(pkg.root, 'src/index.ts')
};
Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-cli",
"version": "1.0.0-beta.15",
"version": "1.0.0-beta.16",
"description": "CLI tool for Angular",
"main": "packages/angular-cli/lib/cli/index.js",
"trackingCode": "UA-8594346-19",
Expand All @@ -12,15 +12,15 @@
"build": "node ./scripts/publish/build.js",
"build:patch": "node ./scripts/patch.js",
"build:packages": "for PKG in packages/*; do echo Building $PKG...; tsc -p $PKG; done",
"test": "npm run test:packages && npm run test:cli",
"test": "npm-run-all -c test:packages test:cli",
"e2e": "npm run test:e2e",
"e2e:nightly": "node tests/e2e_runner.js --nightly",
"mobile_test": "mocha tests/e2e/e2e_workflow.spec.js",
"test:e2e": "node tests/e2e_runner.js",
"test:cli": "node tests/runner",
"test:inspect": "node --inspect --debug-brk tests/runner",
"test:packages": "node scripts/run-packages-spec.js",
"build-config-interface": "dtsgen lib/config/schema.json --out lib/config/schema.d.ts",
"build-config-interface": "dtsgen packages/angular-cli/lib/config/schema.json --out packages/angular-cli/lib/config/schema.d.ts",
"eslint": "eslint .",
"tslint": "tslint \"**/*.ts\" -c tslint.json -e \"**/blueprints/*/files/**/*.ts\" -e \"node_modules/**\" -e \"tmp/**\" -e \"dist/**\"",
"lint": "npm-run-all -c eslint tslint"
Expand Down Expand Up @@ -55,7 +55,7 @@
"awesome-typescript-loader": "^2.2.3",
"chalk": "^1.1.3",
"common-tags": "^1.3.1",
"compression-webpack-plugin": "^0.3.1",
"compression-webpack-plugin": "github:webpack/compression-webpack-plugin#7e55907cd54a2e91b96d25a660acc6a2a6453f54",
"copy-webpack-plugin": "^3.0.1",
"core-js": "^2.4.0",
"css-loader": "^0.23.1",
Expand All @@ -71,6 +71,7 @@
"fs.realpath": "^1.0.0",
"glob": "^7.0.3",
"handlebars": "^4.0.5",
"html-loader": "^0.4.4",
"html-webpack-plugin": "^2.19.0",
"istanbul-instrumenter-loader": "^0.2.0",
"json-loader": "^0.5.4",
Expand Down Expand Up @@ -109,7 +110,7 @@
"typedoc": "^0.4.2",
"typescript": "2.0.2",
"url-loader": "^0.5.7",
"webpack": "2.1.0-beta.22",
"webpack": "2.1.0-beta.25",
"webpack-dev-server": "2.1.0-beta.3",
"webpack-md5-hash": "0.0.5",
"webpack-merge": "^0.14.0",
Expand Down
3 changes: 2 additions & 1 deletion packages/angular-cli/addon/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ module.exports = {
name: 'ng2',

config: function () {
this.project.ngConfig = this.project.ngConfig || config.CliConfig.fromProject().config;
this.project.ngConfigObj = this.project.ngConfigObj || config.CliConfig.fromProject();
this.project.ngConfig = this.project.ngConfig || this.project.ngConfigObj.config;
},

blueprintsPath: function () {
Expand Down
Loading