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
})
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
declare var __moduleName: any;
1+
declare var module.id: any;

public/docs/_examples/testing/ts/app/bag.ts

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,6 @@ import { Component, EventEmitter, Injectable, Input, Output,
55

66
import { Observable } from 'rxjs/Rx';
77

8-
// Let TypeScript know about the special SystemJS __moduleName variable
9-
declare var __moduleName: string;
10-
11-
// moduleName is not set in some module loaders; set it explicitly
12-
if (!__moduleName) {
13-
__moduleName = `http://${location.host}/${location.pathname}/app/`;
14-
}
15-
// console.log(`The __moduleName is ${__moduleName} `);
16-
17-
18-
198
////////// The App: Services and Components for the tests. //////////////
209

2110
////////// Services ///////////////
@@ -136,7 +125,7 @@ export class TestViewProvidersComp {
136125

137126

138127
@Component({
139-
moduleId: __moduleName,
128+
moduleId: module.id,
140129
selector: 'external-template-comp',
141130
templateUrl: 'bag-external-template.html'
142131
})

public/docs/_examples/tsconfig.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/ts/latest/quickstart.jade

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -475,29 +475,37 @@ figure.image-display
475475
.file app.component.ts
476476
.file main.ts
477477
.file node_modules ...
478-
.file typings ...
478+
.file typings
479+
.children
480+
.file typings.d.ts
481+
.file ...
479482
.file index.html
480483
.file package.json
481484
.file styles.css
485+
.file system.config.js
482486
.file tsconfig.json
483487
.file typings.json
484488
:marked
485-
And here are the files:
489+
And here are the files:,
490+
quickstart/ts/typings/typings.d.1.ts
486491
+makeTabs(`
487492
quickstart/ts/app/app.component.ts,
488493
quickstart/ts/app/main.ts,
489494
quickstart/ts/index.html,
490495
quickstart/ts/package.1.json,
491496
quickstart/ts/tsconfig.1.json,
492497
quickstart/ts/typings.1.json,
493-
quickstart/ts/styles.1.css
494-
`,null,
498+
quickstart/ts/styles.1.css,
499+
quickstart/ts/system.config.1.js`
500+
,null,
495501
`app/app.component.ts,
496502
app/main.ts,
497-
index.html,package.json,
503+
index.html,
504+
package.json,
498505
tsconfig.json,
499506
typings.json,
500-
styles.css`)
507+
styles.css,
508+
system.config.js`)
501509
:marked
502510

503511
.l-main-section

0 commit comments

Comments
 (0)