From ecf5c9355c941b0b3deb77a3cac76777d2f3623d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C5=81ukasz=20Holeczek?= <lukasz@holeczek.pl>
Date: Thu, 15 Sep 2016 15:08:05 +0200
Subject: [PATCH] Update Angular2 CLI to Angular 2.0 final release

---
 Angular2_CLI_Dev/angular-cli.json             | 11 +++---
 Angular2_CLI_Dev/e2e/app.e2e-spec.ts          |  8 ++---
 Angular2_CLI_Dev/e2e/app.po.ts                |  2 +-
 Angular2_CLI_Dev/karma.conf.js                |  7 ++--
 Angular2_CLI_Dev/package.json                 | 34 +++++++++----------
 .../src/environments/environment.ts           |  8 ++---
 Angular2_CLI_Dev/src/main.ts                  |  2 +-
 Angular2_CLI_Dev/src/test.ts                  |  4 ++-
 Angular2_CLI_Dev/src/typings.d.ts             |  3 --
 9 files changed, 40 insertions(+), 39 deletions(-)

diff --git a/Angular2_CLI_Dev/angular-cli.json b/Angular2_CLI_Dev/angular-cli.json
index 5dee26a..fa19277 100644
--- a/Angular2_CLI_Dev/angular-cli.json
+++ b/Angular2_CLI_Dev/angular-cli.json
@@ -1,7 +1,7 @@
 {
   "project": {
-    "version": "1.0.0-beta.11-webpack.8",
-    "name": "-angular2-development-cli"
+    "version": "1.0.0-beta.14",
+    "name": "core-ui"
   },
   "apps": [
     {
@@ -21,8 +21,8 @@
       ],
       "environments": {
         "source": "environments/environment.ts",
-        "prod": "environments/environment.prod.ts",
-        "dev": "environments/environment.dev.ts"
+        "dev": "environments/environment.ts",
+        "prod": "environments/environment.prod.ts"
       }
     }
   ],
@@ -40,7 +40,6 @@
   },
   "defaults": {
     "styleExt": "css",
-    "prefixInterfaces": false,
-    "lazyRoutePrefix": "+"
+    "prefixInterfaces": false
   }
 }
diff --git a/Angular2_CLI_Dev/e2e/app.e2e-spec.ts b/Angular2_CLI_Dev/e2e/app.e2e-spec.ts
index dc7a7e5..022797d 100644
--- a/Angular2_CLI_Dev/e2e/app.e2e-spec.ts
+++ b/Angular2_CLI_Dev/e2e/app.e2e-spec.ts
@@ -1,10 +1,10 @@
-import { Angular2DevelopmentCLIPage } from './app.po';
+import { CoreUIPage } from './app.po';
 
-describe('-angular2-development-cli App', function() {
-  let page: Angular2DevelopmentCLIPage;
+describe('core-ui App', function() {
+  let page: CoreUIPage;
 
   beforeEach(() => {
-    page = new Angular2DevelopmentCLIPage();
+    page = new CoreUIPage();
   });
 
   it('should display message saying app works', () => {
diff --git a/Angular2_CLI_Dev/e2e/app.po.ts b/Angular2_CLI_Dev/e2e/app.po.ts
index 8e530af..d51eaf2 100644
--- a/Angular2_CLI_Dev/e2e/app.po.ts
+++ b/Angular2_CLI_Dev/e2e/app.po.ts
@@ -1,6 +1,6 @@
 import { browser, element, by } from 'protractor/globals';
 
-export class Angular2DevelopmentCLIPage {
+export class CoreUIPage {
   navigateTo() {
     return browser.get('/');
   }
diff --git a/Angular2_CLI_Dev/karma.conf.js b/Angular2_CLI_Dev/karma.conf.js
index 945ec5b..e28922a 100644
--- a/Angular2_CLI_Dev/karma.conf.js
+++ b/Angular2_CLI_Dev/karma.conf.js
@@ -3,7 +3,7 @@
 
 module.exports = function (config) {
   config.set({
-    basePath: './',
+    basePath: '',
     frameworks: ['jasmine', 'angular-cli'],
     plugins: [
       require('karma-jasmine'),
@@ -23,7 +23,10 @@ module.exports = function (config) {
         lcovonly: './coverage/coverage.lcov'
       }
     },
-    angularCliConfig: './angular-cli.json',
+    angularCli: {
+      config: './angular-cli.json',
+      environment: 'dev'
+    },
     reporters: ['progress', 'karma-remap-istanbul'],
     port: 9876,
     colors: true,
diff --git a/Angular2_CLI_Dev/package.json b/Angular2_CLI_Dev/package.json
index d99b0e4..3a70773 100644
--- a/Angular2_CLI_Dev/package.json
+++ b/Angular2_CLI_Dev/package.json
@@ -16,37 +16,37 @@
   },
   "private": true,
   "dependencies": {
-    "@angular/common": "2.0.0-rc.6",
-    "@angular/compiler": "2.0.0-rc.6",
-    "@angular/core": "2.0.0-rc.6",
-    "@angular/forms": "2.0.0-rc.6",
-    "@angular/http": "2.0.0-rc.6",
-    "@angular/platform-browser": "2.0.0-rc.6",
-    "@angular/platform-browser-dynamic": "2.0.0-rc.6",
-    "@angular/router": "3.0.0-rc.2",
-    "@angular/upgrade": "2.0.0-rc.6",
+    "@angular/common": "2.0.0",
+    "@angular/compiler": "2.0.0",
+    "@angular/core": "2.0.0",
+    "@angular/forms": "2.0.0",
+    "@angular/http": "2.0.0",
+    "@angular/platform-browser": "2.0.0",
+    "@angular/platform-browser-dynamic": "2.0.0",
+    "@angular/router": "3.0.0",
+    "@angular/upgrade": "2.0.0",
     "core-js": "^2.4.0",
-    "rxjs": "5.0.0-beta.11",
+    "rxjs": "5.0.0-beta.12",
     "ts-helpers": "^1.1.1",
-    "zone.js": "0.6.21",
+    "zone.js": "0.6.23",
 
     "chart.js": "^2.2.1",
-    "ng2-bootstrap": "^1.1.2",
+    "ng2-bootstrap": "^1.1.4",
     "ng2-charts": "^1.2.0",
     "moment": "^2.15.0"
   },
   "devDependencies": {
     "@types/jasmine": "^2.2.30",
-    "angular-cli": "1.0.0-beta.11-webpack.8",
+    "angular-cli": "1.0.0-beta.14",
     "codelyzer": "~0.0.26",
     "jasmine-core": "^2.5.1",
-    "jasmine-spec-reporter": "2.5.0",
-    "karma": "0.13.22",
+    "jasmine-spec-reporter": "2.7.0",
+    "karma": "1.3.0",
     "karma-chrome-launcher": "^2.0.0",
     "karma-jasmine": "^1.0.2",
     "karma-remap-istanbul": "^0.2.1",
-    "protractor": "4.0.3",
-    "ts-node": "1.2.1",
+    "protractor": "4.0.8",
+    "ts-node": "1.3.0",
     "tslint": "^3.15.1",
     "typescript": "^2.0.2"
   }
diff --git a/Angular2_CLI_Dev/src/environments/environment.ts b/Angular2_CLI_Dev/src/environments/environment.ts
index 5c54e15..00313f1 100644
--- a/Angular2_CLI_Dev/src/environments/environment.ts
+++ b/Angular2_CLI_Dev/src/environments/environment.ts
@@ -1,7 +1,7 @@
-// The file for the current environment will overwrite this one during build.
-// Different environments can be found in ./environment.{dev|prod}.ts, and
-// you can create your own and use it with the --env flag.
-// The build system defaults to the dev environment.
+// The file contents for the current environment will overwrite these during build.
+// The build system defaults to the dev environment which uses `environment.ts`, but if you do
+// `ng build --env=prod` then `environment.prod.ts` will be used instead.
+// The list of which env maps to which file can be found in `angular-cli.json`.
 
 export const environment = {
   production: false
diff --git a/Angular2_CLI_Dev/src/main.ts b/Angular2_CLI_Dev/src/main.ts
index 80160e7..5c3c520 100644
--- a/Angular2_CLI_Dev/src/main.ts
+++ b/Angular2_CLI_Dev/src/main.ts
@@ -1,4 +1,4 @@
-import "./polyfills.ts";
+import './polyfills.ts';
 
 import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
 import { enableProdMode } from '@angular/core';
diff --git a/Angular2_CLI_Dev/src/test.ts b/Angular2_CLI_Dev/src/test.ts
index a85e8bb..7727c8e 100644
--- a/Angular2_CLI_Dev/src/test.ts
+++ b/Angular2_CLI_Dev/src/test.ts
@@ -1,13 +1,15 @@
 import './polyfills.ts';
 
 import 'zone.js/dist/long-stack-trace-zone';
+import 'zone.js/dist/proxy.js';
+import 'zone.js/dist/sync-test';
 import 'zone.js/dist/jasmine-patch';
 import 'zone.js/dist/async-test';
 import 'zone.js/dist/fake-async-test';
-import 'zone.js/dist/sync-test';
 
 // Unfortunately there's no typing for the `__karma__` variable. Just declare it as any.
 declare var __karma__: any;
+declare var require: any;
 
 // Prevent Karma from running prematurely.
 __karma__.loaded = function () {};
diff --git a/Angular2_CLI_Dev/src/typings.d.ts b/Angular2_CLI_Dev/src/typings.d.ts
index dc0276d..a73f586 100644
--- a/Angular2_CLI_Dev/src/typings.d.ts
+++ b/Angular2_CLI_Dev/src/typings.d.ts
@@ -3,6 +3,3 @@
 // https://www.typescriptlang.org/docs/handbook/writing-declaration-files.html
 
 declare var System: any;
-declare var module: { id: string };
-declare var require: any;
-
-- 
GitLab