Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit cadd6c9

Browse files
committed
docs: switch to commonjs module generation
1 parent 3d5302a commit cadd6c9

File tree

14 files changed

+30
-40
lines changed

14 files changed

+30
-40
lines changed

public/docs/_examples/component-styles/ts/app/quest-summary.component.ts

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,21 @@
1+
/* tslint:disable:no-unused-variable */
12
// #docplaster
23
import {Component, ViewEncapsulation} from '@angular/core';
34

4-
// #docregion
5-
// Let TypeScript know about the special SystemJS __moduleName variable
6-
declare var __moduleName: string;
7-
// #enddocregion
8-
// moduleName is not set in some module loaders; set it explicitly
9-
if (!__moduleName) {
10-
__moduleName = `http://${location.host}/${location.pathname}/app/`;
11-
}
12-
console.log(`The __moduleName is ${__moduleName} `);
135
// #docregion
146

157
@Component({
16-
moduleId: __moduleName,
8+
moduleId: module.id,
179
selector: 'quest-summary',
1810
// #docregion urls
1911
templateUrl: 'quest-summary.component.html',
2012
styleUrls: ['quest-summary.component.css']
21-
// #enddocregion urls
13+
// #enddocregion urls
2214
// #enddocregion
2315
/*
2416
// #docregion encapsulation.native
2517
// warning: few browsers support shadow DOM encapsulation at this time
26-
encapsulation: ViewEncapsulation.Native
18+
encapsulation: ViewEncapsulation.Native
2719
// #enddocregion encapsulation.native
2820
*/
2921
// #docregion

public/docs/_examples/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"rxjs": "5.0.0-beta.6",
3535
"zone.js": "^0.6.12",
3636

37-
"angular2-in-memory-web-api": "0.0.5",
37+
"angular2-in-memory-web-api": "0.0.6",
3838
"bootstrap": "^3.3.6"
3939
},
4040
"devDependencies": {

public/docs/_examples/quickstart/ts/systemjs.config.1.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// #docregion
12
/**
23
* System configuration for Angular 2 samples
34
* Adjust as necessary for your application needs.

public/docs/_examples/quickstart/ts/tsconfig.1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"compilerOptions": {
33
"target": "es5",
4-
"module": "system",
4+
"module": "commonjs",
55
"moduleResolution": "node",
66
"sourceMap": true,
77
"emitDecoratorMetadata": true,

public/docs/_examples/style-guide/ts/03-05/app/shared/toast/toast.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Component, OnInit } from 'angular2/core';
33
import { ToastService } from './toast.service';
44

55
@Component({
6-
moduleId: __moduleName,
6+
moduleId: module.id,
77
selector: 'toh-toast',
88
templateUrl: '<div>toast</div>'
99
})

public/docs/_examples/style-guide/ts/03-06/app/shared/toast/toast.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Component, OnInit } from 'angular2/core';
33
import { ToastService } from './toast.service';
44

55
@Component({
6-
moduleId: __moduleName,
6+
moduleId: module.id,
77
selector: 'toh-toast',
88
templateUrl: '<div>toast</div>'
99
})

public/docs/_examples/style-guide/ts/04-10/app/shared/filter-text/filter-text.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Component, EventEmitter, Output } from 'angular2/core';
22

33
@Component({
4-
moduleId: __moduleName,
4+
moduleId: module.id,
55
selector: 'toh-filter-text',
66
template: '<div>filter</div>'
77
})

public/docs/_examples/style-guide/ts/04-10/app/shared/modal/modal.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Component, OnInit } from 'angular2/core';
33
import { ModalService } from './modal.service';
44

55
@Component({
6-
moduleId: __moduleName,
6+
moduleId: module.id,
77
selector: 'toh-modal-confirm',
88
template: '<div>modal</div>'
99
})

public/docs/_examples/style-guide/ts/04-10/app/shared/nav/nav.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Component, OnInit } from 'angular2/core';
33
import { ModalService } from '../';
44

55
@Component({
6-
moduleId: __moduleName,
6+
moduleId: module.id,
77
selector: 'toh-nav',
88
template: '<div>nav</div>'
99
})

public/docs/_examples/style-guide/ts/04-10/app/shared/toast/toast.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Component, OnInit } from 'angular2/core';
33
import { ToastService } from './toast.service';
44

55
@Component({
6-
moduleId: __moduleName,
6+
moduleId: module.id,
77
selector: 'toh-toast',
88
templateUrl: '<div>toast</div>'
99
})

0 commit comments

Comments
 (0)