Skip to content

Commit

Permalink
chore(CLI): update sample to angular-cli version beta.21
Browse files Browse the repository at this point in the history
  • Loading branch information
Meligy committed Nov 24, 2016
1 parent 2e72235 commit 6b76727
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = 0
max_line_length = off
trim_trailing_whitespace = false
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
/.vscode
.project
.classpath
.c9/
*.launch
.settings/

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The project shows a simple website, showing a `bundled` route loaded in the main

## Standard Angular CLI Docs

The project was generated with [angular-cli](https://github.com/angular/angular-cli) version 1.0.0-beta.19-3.
The project was generated with [angular-cli](https://github.com/angular/angular-cli) version 1.0.0-beta.21.

The commands below have been modified to ensure you are using the locally installed `angular-cli` package.

Expand Down
2 changes: 1 addition & 1 deletion angular-cli.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"project": {
"version": "1.0.0-beta.19-3",
"version": "1.0.0-beta.21",
"name": "routing-angular-cli"
},
"apps": [
Expand Down
3 changes: 3 additions & 0 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ module.exports = function (config) {
preprocessors: {
'./src/test.ts': ['angular-cli']
},
mime: {
'text/x-typescript': ['ts','tsx']
},
remapIstanbulReporter: {
reports: {
html: 'coverage',
Expand Down
25 changes: 13 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,26 @@
},
"private": true,
"dependencies": {
"@angular/common": "~2.1.0",
"@angular/compiler": "~2.1.0",
"@angular/core": "~2.1.0",
"@angular/forms": "~2.1.0",
"@angular/http": "~2.1.0",
"@angular/platform-browser": "~2.1.0",
"@angular/platform-browser-dynamic": "~2.1.0",
"@angular/router": "~3.1.0",
"@angular/common": "2.2.1",
"@angular/compiler": "2.2.1",
"@angular/core": "2.2.1",
"@angular/forms": "2.2.1",
"@angular/http": "2.2.1",
"@angular/platform-browser": "2.2.1",
"@angular/platform-browser-dynamic": "2.2.1",
"@angular/router": "3.2.1",
"core-js": "^2.4.1",
"rxjs": "5.0.0-beta.12",
"ts-helpers": "^1.1.1",
"zone.js": "^0.6.23"
},
"devDependencies": {
"@types/jasmine": "^2.2.30",
"@angular/compiler-cli": "2.2.1",
"@types/jasmine": "2.5.38",
"@types/node": "^6.0.42",
"angular-cli": "1.0.0-beta.19-3",
"codelyzer": "1.0.0-beta.1",
"jasmine-core": "2.4.1",
"angular-cli": "1.0.0-beta.21",
"codelyzer": "~1.0.0-beta.3",
"jasmine-core": "2.5.2",
"jasmine-spec-reporter": "2.5.0",
"karma": "1.2.0",
"karma-chrome-launcher": "^2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { TestBed, async } from '@angular/core/testing';
import { AppComponent } from './app.component';

describe('App: RoutingAngularCli', () => {
describe('AppComponent', () => {
beforeEach(() => {
TestBed.configureTestingModule({
declarations: [
Expand Down
2 changes: 1 addition & 1 deletion src/styles.scss
Original file line number Diff line number Diff line change
@@ -1 +1 @@
/* You can add global styles to this file, and also import other style files */
/* You can add global styles to this file, and also import other style files */
34 changes: 16 additions & 18 deletions src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ 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 { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting
} from '@angular/platform-browser-dynamic/testing';

// Unfortunately there's no typing for the `__karma__` variable. Just declare it as any.
declare var __karma__: any;
Expand All @@ -14,21 +19,14 @@ declare var require: any;
// Prevent Karma from running prematurely.
__karma__.loaded = function () {};


Promise.all([
System.import('@angular/core/testing'),
System.import('@angular/platform-browser-dynamic/testing')
])
// First, initialize the Angular testing environment.
.then(([testing, testingBrowser]) => {
testing.getTestBed().initTestEnvironment(
testingBrowser.BrowserDynamicTestingModule,
testingBrowser.platformBrowserDynamicTesting()
);
})
// Then we find all the tests.
.then(() => require.context('./', true, /\.spec\.ts/))
// And load the modules.
.then(context => context.keys().map(context))
// Finally, start Karma to run the tests.
.then(__karma__.start, __karma__.error);
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting()
);
// Then we find all the tests.
let context = require.context('./', true, /\.spec\.ts/);
// And load the modules.
context.keys().map(context);
// Finally, start Karma to run the tests.
__karma__.start();
1 change: 1 addition & 0 deletions src/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"compilerOptions": {
"baseUrl": "",
"declaration": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
Expand Down
2 changes: 0 additions & 2 deletions src/typings.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
// Typings reference file, you can add your own global typings here
// https://www.typescriptlang.org/docs/handbook/writing-declaration-files.html

declare var System: any;

0 comments on commit 6b76727

Please sign in to comment.