Skip to content

Commit 6b76727

Browse files
committed
chore(CLI): update sample to angular-cli version beta.21
1 parent 2e72235 commit 6b76727

File tree

11 files changed

+39
-37
lines changed

11 files changed

+39
-37
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ insert_final_newline = true
99
trim_trailing_whitespace = true
1010

1111
[*.md]
12-
max_line_length = 0
12+
max_line_length = off
1313
trim_trailing_whitespace = false

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
/.vscode
1414
.project
1515
.classpath
16+
.c9/
1617
*.launch
1718
.settings/
1819

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The project shows a simple website, showing a `bundled` route loaded in the main
66

77
## Standard Angular CLI Docs
88

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

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

angular-cli.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"project": {
3-
"version": "1.0.0-beta.19-3",
3+
"version": "1.0.0-beta.21",
44
"name": "routing-angular-cli"
55
},
66
"apps": [

karma.conf.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ module.exports = function (config) {
1717
preprocessors: {
1818
'./src/test.ts': ['angular-cli']
1919
},
20+
mime: {
21+
'text/x-typescript': ['ts','tsx']
22+
},
2023
remapIstanbulReporter: {
2124
reports: {
2225
html: 'coverage',

package.json

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,26 @@
1414
},
1515
"private": true,
1616
"dependencies": {
17-
"@angular/common": "~2.1.0",
18-
"@angular/compiler": "~2.1.0",
19-
"@angular/core": "~2.1.0",
20-
"@angular/forms": "~2.1.0",
21-
"@angular/http": "~2.1.0",
22-
"@angular/platform-browser": "~2.1.0",
23-
"@angular/platform-browser-dynamic": "~2.1.0",
24-
"@angular/router": "~3.1.0",
17+
"@angular/common": "2.2.1",
18+
"@angular/compiler": "2.2.1",
19+
"@angular/core": "2.2.1",
20+
"@angular/forms": "2.2.1",
21+
"@angular/http": "2.2.1",
22+
"@angular/platform-browser": "2.2.1",
23+
"@angular/platform-browser-dynamic": "2.2.1",
24+
"@angular/router": "3.2.1",
2525
"core-js": "^2.4.1",
2626
"rxjs": "5.0.0-beta.12",
2727
"ts-helpers": "^1.1.1",
2828
"zone.js": "^0.6.23"
2929
},
3030
"devDependencies": {
31-
"@types/jasmine": "^2.2.30",
31+
"@angular/compiler-cli": "2.2.1",
32+
"@types/jasmine": "2.5.38",
3233
"@types/node": "^6.0.42",
33-
"angular-cli": "1.0.0-beta.19-3",
34-
"codelyzer": "1.0.0-beta.1",
35-
"jasmine-core": "2.4.1",
34+
"angular-cli": "1.0.0-beta.21",
35+
"codelyzer": "~1.0.0-beta.3",
36+
"jasmine-core": "2.5.2",
3637
"jasmine-spec-reporter": "2.5.0",
3738
"karma": "1.2.0",
3839
"karma-chrome-launcher": "^2.0.0",

src/app/app.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import { TestBed, async } from '@angular/core/testing';
44
import { AppComponent } from './app.component';
55

6-
describe('App: RoutingAngularCli', () => {
6+
describe('AppComponent', () => {
77
beforeEach(() => {
88
TestBed.configureTestingModule({
99
declarations: [

src/styles.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
/* You can add global styles to this file, and also import other style files */
1+
/* You can add global styles to this file, and also import other style files */

src/test.ts

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ import 'zone.js/dist/sync-test';
66
import 'zone.js/dist/jasmine-patch';
77
import 'zone.js/dist/async-test';
88
import 'zone.js/dist/fake-async-test';
9+
import { getTestBed } from '@angular/core/testing';
10+
import {
11+
BrowserDynamicTestingModule,
12+
platformBrowserDynamicTesting
13+
} from '@angular/platform-browser-dynamic/testing';
914

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

17-
18-
Promise.all([
19-
System.import('@angular/core/testing'),
20-
System.import('@angular/platform-browser-dynamic/testing')
21-
])
22-
// First, initialize the Angular testing environment.
23-
.then(([testing, testingBrowser]) => {
24-
testing.getTestBed().initTestEnvironment(
25-
testingBrowser.BrowserDynamicTestingModule,
26-
testingBrowser.platformBrowserDynamicTesting()
27-
);
28-
})
29-
// Then we find all the tests.
30-
.then(() => require.context('./', true, /\.spec\.ts/))
31-
// And load the modules.
32-
.then(context => context.keys().map(context))
33-
// Finally, start Karma to run the tests.
34-
.then(__karma__.start, __karma__.error);
22+
// First, initialize the Angular testing environment.
23+
getTestBed().initTestEnvironment(
24+
BrowserDynamicTestingModule,
25+
platformBrowserDynamicTesting()
26+
);
27+
// Then we find all the tests.
28+
let context = require.context('./', true, /\.spec\.ts/);
29+
// And load the modules.
30+
context.keys().map(context);
31+
// Finally, start Karma to run the tests.
32+
__karma__.start();

src/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"compilerOptions": {
3+
"baseUrl": "",
34
"declaration": false,
45
"emitDecoratorMetadata": true,
56
"experimentalDecorators": true,

src/typings.d.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
// Typings reference file, you can add your own global typings here
22
// https://www.typescriptlang.org/docs/handbook/writing-declaration-files.html
3-
4-
declare var System: any;

0 commit comments

Comments
 (0)