docs: switch to commonjs module generation
This commit is contained in:
parent
3d5302adce
commit
cadd6c9823
|
@ -1,29 +1,21 @@
|
||||||
|
/* tslint:disable:no-unused-variable */
|
||||||
// #docplaster
|
// #docplaster
|
||||||
import {Component, ViewEncapsulation} from '@angular/core';
|
import {Component, ViewEncapsulation} from '@angular/core';
|
||||||
|
|
||||||
// #docregion
|
|
||||||
// Let TypeScript know about the special SystemJS __moduleName variable
|
|
||||||
declare var __moduleName: string;
|
|
||||||
// #enddocregion
|
|
||||||
// moduleName is not set in some module loaders; set it explicitly
|
|
||||||
if (!__moduleName) {
|
|
||||||
__moduleName = `http://${location.host}/${location.pathname}/app/`;
|
|
||||||
}
|
|
||||||
console.log(`The __moduleName is ${__moduleName} `);
|
|
||||||
// #docregion
|
// #docregion
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: __moduleName,
|
moduleId: module.id,
|
||||||
selector: 'quest-summary',
|
selector: 'quest-summary',
|
||||||
// #docregion urls
|
// #docregion urls
|
||||||
templateUrl: 'quest-summary.component.html',
|
templateUrl: 'quest-summary.component.html',
|
||||||
styleUrls: ['quest-summary.component.css']
|
styleUrls: ['quest-summary.component.css']
|
||||||
// #enddocregion urls
|
// #enddocregion urls
|
||||||
// #enddocregion
|
// #enddocregion
|
||||||
/*
|
/*
|
||||||
// #docregion encapsulation.native
|
// #docregion encapsulation.native
|
||||||
// warning: few browsers support shadow DOM encapsulation at this time
|
// warning: few browsers support shadow DOM encapsulation at this time
|
||||||
encapsulation: ViewEncapsulation.Native
|
encapsulation: ViewEncapsulation.Native
|
||||||
// #enddocregion encapsulation.native
|
// #enddocregion encapsulation.native
|
||||||
*/
|
*/
|
||||||
// #docregion
|
// #docregion
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
"rxjs": "5.0.0-beta.6",
|
"rxjs": "5.0.0-beta.6",
|
||||||
"zone.js": "^0.6.12",
|
"zone.js": "^0.6.12",
|
||||||
|
|
||||||
"angular2-in-memory-web-api": "0.0.5",
|
"angular2-in-memory-web-api": "0.0.6",
|
||||||
"bootstrap": "^3.3.6"
|
"bootstrap": "^3.3.6"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
// #docregion
|
||||||
/**
|
/**
|
||||||
* System configuration for Angular 2 samples
|
* System configuration for Angular 2 samples
|
||||||
* Adjust as necessary for your application needs.
|
* Adjust as necessary for your application needs.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
"module": "system",
|
"module": "commonjs",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"emitDecoratorMetadata": true,
|
"emitDecoratorMetadata": true,
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { Component, OnInit } from 'angular2/core';
|
||||||
import { ToastService } from './toast.service';
|
import { ToastService } from './toast.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: __moduleName,
|
moduleId: module.id,
|
||||||
selector: 'toh-toast',
|
selector: 'toh-toast',
|
||||||
templateUrl: '<div>toast</div>'
|
templateUrl: '<div>toast</div>'
|
||||||
})
|
})
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { Component, OnInit } from 'angular2/core';
|
||||||
import { ToastService } from './toast.service';
|
import { ToastService } from './toast.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: __moduleName,
|
moduleId: module.id,
|
||||||
selector: 'toh-toast',
|
selector: 'toh-toast',
|
||||||
templateUrl: '<div>toast</div>'
|
templateUrl: '<div>toast</div>'
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { Component, EventEmitter, Output } from 'angular2/core';
|
import { Component, EventEmitter, Output } from 'angular2/core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: __moduleName,
|
moduleId: module.id,
|
||||||
selector: 'toh-filter-text',
|
selector: 'toh-filter-text',
|
||||||
template: '<div>filter</div>'
|
template: '<div>filter</div>'
|
||||||
})
|
})
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { Component, OnInit } from 'angular2/core';
|
||||||
import { ModalService } from './modal.service';
|
import { ModalService } from './modal.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: __moduleName,
|
moduleId: module.id,
|
||||||
selector: 'toh-modal-confirm',
|
selector: 'toh-modal-confirm',
|
||||||
template: '<div>modal</div>'
|
template: '<div>modal</div>'
|
||||||
})
|
})
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { Component, OnInit } from 'angular2/core';
|
||||||
import { ModalService } from '../';
|
import { ModalService } from '../';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: __moduleName,
|
moduleId: module.id,
|
||||||
selector: 'toh-nav',
|
selector: 'toh-nav',
|
||||||
template: '<div>nav</div>'
|
template: '<div>nav</div>'
|
||||||
})
|
})
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { Component, OnInit } from 'angular2/core';
|
||||||
import { ToastService } from './toast.service';
|
import { ToastService } from './toast.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: __moduleName,
|
moduleId: module.id,
|
||||||
selector: 'toh-toast',
|
selector: 'toh-toast',
|
||||||
templateUrl: '<div>toast</div>'
|
templateUrl: '<div>toast</div>'
|
||||||
})
|
})
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
declare var __moduleName: any;
|
declare var module.id: any;
|
||||||
|
|
|
@ -5,17 +5,6 @@ import { Component, EventEmitter, Injectable, Input, Output,
|
||||||
|
|
||||||
import { Observable } from 'rxjs/Rx';
|
import { Observable } from 'rxjs/Rx';
|
||||||
|
|
||||||
// Let TypeScript know about the special SystemJS __moduleName variable
|
|
||||||
declare var __moduleName: string;
|
|
||||||
|
|
||||||
// moduleName is not set in some module loaders; set it explicitly
|
|
||||||
if (!__moduleName) {
|
|
||||||
__moduleName = `http://${location.host}/${location.pathname}/app/`;
|
|
||||||
}
|
|
||||||
// console.log(`The __moduleName is ${__moduleName} `);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
////////// The App: Services and Components for the tests. //////////////
|
////////// The App: Services and Components for the tests. //////////////
|
||||||
|
|
||||||
////////// Services ///////////////
|
////////// Services ///////////////
|
||||||
|
@ -136,7 +125,7 @@ export class TestViewProvidersComp {
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: __moduleName,
|
moduleId: module.id,
|
||||||
selector: 'external-template-comp',
|
selector: 'external-template-comp',
|
||||||
templateUrl: 'bag-external-template.html'
|
templateUrl: 'bag-external-template.html'
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
"module": "system",
|
"module": "commonjs",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"emitDecoratorMetadata": true,
|
"emitDecoratorMetadata": true,
|
||||||
|
|
|
@ -475,14 +475,19 @@ figure.image-display
|
||||||
.file app.component.ts
|
.file app.component.ts
|
||||||
.file main.ts
|
.file main.ts
|
||||||
.file node_modules ...
|
.file node_modules ...
|
||||||
.file typings ...
|
.file typings
|
||||||
|
.children
|
||||||
|
.file typings.d.ts
|
||||||
|
.file ...
|
||||||
.file index.html
|
.file index.html
|
||||||
.file package.json
|
.file package.json
|
||||||
.file styles.css
|
.file styles.css
|
||||||
|
.file system.config.js
|
||||||
.file tsconfig.json
|
.file tsconfig.json
|
||||||
.file typings.json
|
.file typings.json
|
||||||
:marked
|
:marked
|
||||||
And here are the files:
|
And here are the files:,
|
||||||
|
quickstart/ts/typings/typings.d.1.ts
|
||||||
+makeTabs(`
|
+makeTabs(`
|
||||||
quickstart/ts/app/app.component.ts,
|
quickstart/ts/app/app.component.ts,
|
||||||
quickstart/ts/app/main.ts,
|
quickstart/ts/app/main.ts,
|
||||||
|
@ -490,14 +495,17 @@ figure.image-display
|
||||||
quickstart/ts/package.1.json,
|
quickstart/ts/package.1.json,
|
||||||
quickstart/ts/tsconfig.1.json,
|
quickstart/ts/tsconfig.1.json,
|
||||||
quickstart/ts/typings.1.json,
|
quickstart/ts/typings.1.json,
|
||||||
quickstart/ts/styles.1.css
|
quickstart/ts/styles.1.css,
|
||||||
`,null,
|
quickstart/ts/system.config.1.js`
|
||||||
|
,null,
|
||||||
`app/app.component.ts,
|
`app/app.component.ts,
|
||||||
app/main.ts,
|
app/main.ts,
|
||||||
index.html,package.json,
|
index.html,
|
||||||
|
package.json,
|
||||||
tsconfig.json,
|
tsconfig.json,
|
||||||
typings.json,
|
typings.json,
|
||||||
styles.css`)
|
styles.css,
|
||||||
|
system.config.js`)
|
||||||
:marked
|
:marked
|
||||||
|
|
||||||
.l-main-section
|
.l-main-section
|
||||||
|
|
Loading…
Reference in New Issue