chore: update systemjs.configs and plunker-builder/indexHtmlTranslator for RC6
This commit is contained in:
parent
050ef863da
commit
9d5bbfca15
|
@ -27,6 +27,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/common": "2.0.0-rc.6",
|
"@angular/common": "2.0.0-rc.6",
|
||||||
"@angular/compiler": "2.0.0-rc.6",
|
"@angular/compiler": "2.0.0-rc.6",
|
||||||
|
"@angular/compiler-cli": "0.6.0",
|
||||||
"@angular/core": "2.0.0-rc.6",
|
"@angular/core": "2.0.0-rc.6",
|
||||||
"@angular/forms": "2.0.0-rc.6",
|
"@angular/forms": "2.0.0-rc.6",
|
||||||
"@angular/http": "2.0.0-rc.6",
|
"@angular/http": "2.0.0-rc.6",
|
||||||
|
@ -54,14 +55,14 @@
|
||||||
"html-webpack-plugin": "^2.16.1",
|
"html-webpack-plugin": "^2.16.1",
|
||||||
"http-server": "^0.9.0",
|
"http-server": "^0.9.0",
|
||||||
"jasmine-core": "^2.4.1",
|
"jasmine-core": "^2.4.1",
|
||||||
"karma": "^0.13.22",
|
"karma": "^1.2.0",
|
||||||
"karma-chrome-launcher": "^1.0.1",
|
"karma-chrome-launcher": "^2.0.0",
|
||||||
"karma-cli": "^1.0.0",
|
"karma-cli": "^1.0.1",
|
||||||
"karma-htmlfile-reporter": "^0.3.1",
|
"karma-htmlfile-reporter": "^0.3.4",
|
||||||
"karma-jasmine": "^1.0.2",
|
"karma-jasmine": "^1.0.2",
|
||||||
"karma-phantomjs-launcher": "^1.0.0",
|
"karma-phantomjs-launcher": "^1.0.2",
|
||||||
"karma-sourcemap-loader": "^0.3.7",
|
"karma-sourcemap-loader": "^0.3.7",
|
||||||
"karma-webpack": "^1.7.0",
|
"karma-webpack": "^1.8.0",
|
||||||
"lite-server": "^2.2.2",
|
"lite-server": "^2.2.2",
|
||||||
"lodash": "^4.13.1",
|
"lodash": "^4.13.1",
|
||||||
"null-loader": "^0.1.1",
|
"null-loader": "^0.1.1",
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/common": "2.0.0-rc.6",
|
"@angular/common": "2.0.0-rc.6",
|
||||||
"@angular/compiler": "2.0.0-rc.6",
|
"@angular/compiler": "2.0.0-rc.6",
|
||||||
"@angular/compiler-cli": "0.5.0",
|
"@angular/compiler-cli": "0.6.0",
|
||||||
"@angular/core": "2.0.0-rc.6",
|
"@angular/core": "2.0.0-rc.6",
|
||||||
"@angular/forms": "2.0.0-rc.6",
|
"@angular/forms": "2.0.0-rc.6",
|
||||||
"@angular/http": "2.0.0-rc.6",
|
"@angular/http": "2.0.0-rc.6",
|
||||||
|
|
|
@ -1,60 +1,55 @@
|
||||||
// #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.
|
||||||
*/
|
*/
|
||||||
(function (global) {
|
(function (global) {
|
||||||
|
System.config({
|
||||||
|
paths: {
|
||||||
|
// paths serve as alias
|
||||||
|
'npm:': 'node_modules/'
|
||||||
|
},
|
||||||
// map tells the System loader where to look for things
|
// map tells the System loader where to look for things
|
||||||
var map = {
|
map: {
|
||||||
'app': 'app', // 'dist',
|
// our app is within the app folder
|
||||||
|
app: 'app',
|
||||||
|
|
||||||
'@angular': 'node_modules/@angular',
|
// angular bundles
|
||||||
'angular2-in-memory-web-api': 'node_modules/angular2-in-memory-web-api',
|
'@angular/core': 'npm:@angular/core/bundles/core.umd.js',
|
||||||
'rxjs': 'node_modules/rxjs'
|
'@angular/common': 'npm:@angular/common/bundles/common.umd.js',
|
||||||
};
|
'@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
|
||||||
|
'@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
|
||||||
|
'@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
|
||||||
|
'@angular/http': 'npm:@angular/http/bundles/http.umd.js',
|
||||||
|
'@angular/router': 'npm:@angular/router/bundles/router.umd.js',
|
||||||
|
'@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',
|
||||||
|
|
||||||
|
// angular testing umd bundles
|
||||||
|
'@angular/core/testing': 'npm:@angular/core/bundles/core-testing.umd.js',
|
||||||
|
'@angular/common/testing': 'npm:@angular/common/bundles/common-testing.umd.js',
|
||||||
|
'@angular/compiler/testing': 'npm:@angular/compiler/bundles/compiler-testing.umd.js',
|
||||||
|
'@angular/platform-browser/testing': 'npm:@angular/platform-browser/bundles/platform-browser-testing.umd.js',
|
||||||
|
'@angular/platform-browser-dynamic/testing': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic-testing.umd.js',
|
||||||
|
'@angular/http/testing': 'npm:@angular/http/bundles/http-testing.umd.js',
|
||||||
|
'@angular/router/testing': 'npm:@angular/router/bundles/router-testing.umd.js',
|
||||||
|
'@angular/forms/testing': 'npm:@angular/forms/bundles/forms-testing.umd.js',
|
||||||
|
|
||||||
|
// other libraries
|
||||||
|
'rxjs': 'npm:rxjs',
|
||||||
|
'angular2-in-memory-web-api': 'npm:angular2-in-memory-web-api',
|
||||||
|
},
|
||||||
// packages tells the System loader how to load when no filename and/or no extension
|
// packages tells the System loader how to load when no filename and/or no extension
|
||||||
var packages = {
|
packages: {
|
||||||
'app': { main: 'main.js', defaultExtension: 'js' },
|
app: {
|
||||||
'rxjs': { defaultExtension: 'js' },
|
main: './main.js',
|
||||||
'angular2-in-memory-web-api': { main: 'index.js', defaultExtension: 'js' },
|
defaultExtension: 'js'
|
||||||
};
|
},
|
||||||
|
rxjs: {
|
||||||
var ngPackageNames = [
|
defaultExtension: 'js'
|
||||||
'common',
|
},
|
||||||
'compiler',
|
'angular2-in-memory-web-api': {
|
||||||
'core',
|
main: './index.js',
|
||||||
'forms',
|
defaultExtension: 'js'
|
||||||
'http',
|
|
||||||
'platform-browser',
|
|
||||||
'platform-browser-dynamic',
|
|
||||||
'router',
|
|
||||||
'router-deprecated',
|
|
||||||
'upgrade',
|
|
||||||
];
|
|
||||||
|
|
||||||
// Individual files (~300 requests):
|
|
||||||
function packIndex(pkgName) {
|
|
||||||
packages['@angular/'+pkgName] = { main: 'index.js', defaultExtension: 'js' };
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bundled (~40 requests):
|
|
||||||
function packUmd(pkgName) {
|
|
||||||
packages['@angular/'+pkgName] = { main: 'bundles/' + pkgName + '.umd.js', defaultExtension: 'js' };
|
|
||||||
}
|
}
|
||||||
|
});
|
||||||
// Most environments should use UMD; some (Karma) need the individual index files
|
|
||||||
var setPackageConfig = System.packageWithIndex ? packIndex : packUmd;
|
|
||||||
|
|
||||||
// Add package entries for angular packages
|
|
||||||
ngPackageNames.forEach(setPackageConfig);
|
|
||||||
|
|
||||||
var config = {
|
|
||||||
map: map,
|
|
||||||
packages: packages
|
|
||||||
};
|
|
||||||
|
|
||||||
System.config(config);
|
|
||||||
|
|
||||||
})(this);
|
})(this);
|
||||||
|
|
|
@ -3,57 +3,53 @@
|
||||||
* Adjust as necessary for your application needs.
|
* Adjust as necessary for your application needs.
|
||||||
*/
|
*/
|
||||||
(function (global) {
|
(function (global) {
|
||||||
|
System.config({
|
||||||
|
paths: {
|
||||||
|
// paths serve as alias
|
||||||
|
'npm:': 'node_modules/'
|
||||||
|
},
|
||||||
// map tells the System loader where to look for things
|
// map tells the System loader where to look for things
|
||||||
var map = {
|
map: {
|
||||||
'app': 'app', // 'dist',
|
// our app is within the app folder
|
||||||
|
app: 'app',
|
||||||
|
|
||||||
'@angular': 'node_modules/@angular',
|
// angular bundles
|
||||||
'angular2-in-memory-web-api': 'node_modules/angular2-in-memory-web-api',
|
'@angular/core': 'npm:@angular/core/bundles/core.umd.js',
|
||||||
'rxjs': 'node_modules/rxjs'
|
'@angular/common': 'npm:@angular/common/bundles/common.umd.js',
|
||||||
};
|
'@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
|
||||||
|
'@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
|
||||||
|
'@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
|
||||||
|
'@angular/http': 'npm:@angular/http/bundles/http.umd.js',
|
||||||
|
'@angular/router': 'npm:@angular/router/bundles/router.umd.js',
|
||||||
|
'@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',
|
||||||
|
|
||||||
|
// angular testing umd bundles
|
||||||
|
'@angular/core/testing': 'npm:@angular/core/bundles/core-testing.umd.js',
|
||||||
|
'@angular/common/testing': 'npm:@angular/common/bundles/common-testing.umd.js',
|
||||||
|
'@angular/compiler/testing': 'npm:@angular/compiler/bundles/compiler-testing.umd.js',
|
||||||
|
'@angular/platform-browser/testing': 'npm:@angular/platform-browser/bundles/platform-browser-testing.umd.js',
|
||||||
|
'@angular/platform-browser-dynamic/testing': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic-testing.umd.js',
|
||||||
|
'@angular/http/testing': 'npm:@angular/http/bundles/http-testing.umd.js',
|
||||||
|
'@angular/router/testing': 'npm:@angular/router/bundles/router-testing.umd.js',
|
||||||
|
'@angular/forms/testing': 'npm:@angular/forms/bundles/forms-testing.umd.js',
|
||||||
|
|
||||||
|
// other libraries
|
||||||
|
'rxjs': 'npm:rxjs',
|
||||||
|
'angular2-in-memory-web-api': 'npm:angular2-in-memory-web-api',
|
||||||
|
},
|
||||||
// packages tells the System loader how to load when no filename and/or no extension
|
// packages tells the System loader how to load when no filename and/or no extension
|
||||||
var packages = {
|
packages: {
|
||||||
'app': { main: 'main.js', defaultExtension: 'js' },
|
app: {
|
||||||
'rxjs': { defaultExtension: 'js' },
|
main: './main.js',
|
||||||
'angular2-in-memory-web-api': { main: 'index.js', defaultExtension: 'js' },
|
defaultExtension: 'js'
|
||||||
};
|
},
|
||||||
|
rxjs: {
|
||||||
var ngPackageNames = [
|
defaultExtension: 'js'
|
||||||
'common',
|
},
|
||||||
'compiler',
|
'angular2-in-memory-web-api': {
|
||||||
'core',
|
main: './index.js',
|
||||||
'forms',
|
defaultExtension: 'js'
|
||||||
'http',
|
|
||||||
'platform-browser',
|
|
||||||
'platform-browser-dynamic',
|
|
||||||
'router',
|
|
||||||
'router-deprecated',
|
|
||||||
'upgrade',
|
|
||||||
];
|
|
||||||
|
|
||||||
// Individual files (~300 requests):
|
|
||||||
function packIndex(pkgName) {
|
|
||||||
packages['@angular/'+pkgName] = { main: 'index.js', defaultExtension: 'js' };
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bundled (~40 requests):
|
|
||||||
function packUmd(pkgName) {
|
|
||||||
packages['@angular/'+pkgName] = { main: 'bundles/' + pkgName + '.umd.js' };
|
|
||||||
}
|
}
|
||||||
|
});
|
||||||
// Most environments should use UMD; some (Karma) need the individual index files
|
|
||||||
var setPackageConfig = System.packageWithIndex ? packIndex : packUmd;
|
|
||||||
|
|
||||||
// Add package entries for angular packages
|
|
||||||
ngPackageNames.forEach(setPackageConfig);
|
|
||||||
|
|
||||||
var config = {
|
|
||||||
map: map,
|
|
||||||
packages: packages
|
|
||||||
};
|
|
||||||
|
|
||||||
System.config(config);
|
|
||||||
|
|
||||||
})(this);
|
})(this);
|
||||||
|
|
|
@ -1,78 +1,13 @@
|
||||||
/**
|
/**
|
||||||
* PLUNKER CURRENT BUILD VERSION
|
* PLUNKER VERSION FOR CURRENT ANGULAR BUILD
|
||||||
* (based on systemjs.config.js in angular.io)
|
* (based on systemjs.config.js in angular.io)
|
||||||
* 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.
|
||||||
|
*
|
||||||
|
* UNTESTED !
|
||||||
*/
|
*/
|
||||||
(function (global) {
|
(function (global) {
|
||||||
//map tells the System loader where to look for things
|
System.config({
|
||||||
var map = {
|
|
||||||
'app': 'app',
|
|
||||||
|
|
||||||
|
|
||||||
'@angular/core': 'https://cdn.rawgit.com/angular/core-builds/master',
|
|
||||||
'@angular/common': 'https://cdn.rawgit.com/angular/common-builds/master',
|
|
||||||
'@angular/compiler':'https://cdn.rawgit.com/angular/compiler-builds/master',
|
|
||||||
'@angular/forms':'https://cdn.rawgit.com/angular/forms-builds/master',
|
|
||||||
'@angular/http':'https://cdn.rawgit.com/angular/http-builds/master',
|
|
||||||
'@angular/platform-browser':'https://cdn.rawgit.com/angular/platform-browser-builds/master',
|
|
||||||
'@angular/platform-browser-dynamic': 'https://cdn.rawgit.com/angular/platform-browser-dynamic-builds/master',
|
|
||||||
'@angular/router': 'https://cdn.rawgit.com/angular/router-builds/master',
|
|
||||||
|
|
||||||
'rxjs': 'https://unpkg.com/rxjs@5.0.0-beta.11',
|
|
||||||
'ts': 'https://unpkg.com/plugin-typescript@4.0.10/lib/plugin.js',
|
|
||||||
'typescript': 'https://unpkg.com/typescript@1.9.0-dev.20160409/lib/typescript.js',
|
|
||||||
|
|
||||||
'angular2-in-memory-web-api': 'https://unpkg.com/angular2-in-memory-web-api',
|
|
||||||
};
|
|
||||||
|
|
||||||
//packages tells the System loader how to load when no filename and/or no extension
|
|
||||||
var packages = {
|
|
||||||
app: {
|
|
||||||
main: 'main.ts',
|
|
||||||
defaultExtension: 'ts'
|
|
||||||
},
|
|
||||||
'@angular/core': {
|
|
||||||
main: 'index.js',
|
|
||||||
defaultExtension: 'js'
|
|
||||||
},
|
|
||||||
'@angular/compiler': {
|
|
||||||
main: 'index.js',
|
|
||||||
defaultExtension: 'js'
|
|
||||||
},
|
|
||||||
'@angular/common': {
|
|
||||||
main: 'index.js',
|
|
||||||
defaultExtension: 'js'
|
|
||||||
},
|
|
||||||
'@angular/forms': {
|
|
||||||
main: 'index.js',
|
|
||||||
defaultExtension: 'js'
|
|
||||||
},
|
|
||||||
'@angular/http': {
|
|
||||||
main: 'index.js',
|
|
||||||
defaultExtension: 'js'
|
|
||||||
},
|
|
||||||
'@angular/platform-browser-dynamic': {
|
|
||||||
main: 'index.js',
|
|
||||||
defaultExtension: 'js'
|
|
||||||
},
|
|
||||||
'@angular/platform-browser': {
|
|
||||||
main: 'index.js',
|
|
||||||
defaultExtension: 'js'
|
|
||||||
},
|
|
||||||
'@angular/router': {
|
|
||||||
main: 'index.js',
|
|
||||||
defaultExtension: 'js'
|
|
||||||
},
|
|
||||||
'angular2-in-memory-web-api': {
|
|
||||||
main: 'index.js',
|
|
||||||
defaultExtension: 'js'
|
|
||||||
},
|
|
||||||
rxjs: {
|
|
||||||
defaultExtension: 'js'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
var config = {
|
|
||||||
// DEMO ONLY! REAL CODE SHOULD NOT TRANSPILE IN THE BROWSER
|
// DEMO ONLY! REAL CODE SHOULD NOT TRANSPILE IN THE BROWSER
|
||||||
transpiler: 'ts',
|
transpiler: 'ts',
|
||||||
typescriptOptions: {
|
typescriptOptions: {
|
||||||
|
@ -83,10 +18,56 @@
|
||||||
"exports": "ts"
|
"exports": "ts"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
map: map,
|
paths: {
|
||||||
packages: packages
|
// paths serve as alias
|
||||||
};
|
'npm:': 'https://unpkg.com/',
|
||||||
|
'ng:': 'https://cdn.rawgit.com/angular/'
|
||||||
|
},
|
||||||
|
// map tells the System loader where to look for things
|
||||||
|
map: {
|
||||||
|
// our app is within the app folder
|
||||||
|
app: 'app',
|
||||||
|
|
||||||
System.config(config);
|
// angular bundles
|
||||||
|
'@angular/core': 'ng:core-builds/master/bundles/core.umd.js',
|
||||||
|
'@angular/common': 'ng:common-builds/master/bundles/common.umd.js',
|
||||||
|
'@angular/compiler': 'ng:compiler-builds/master/bundles/compiler.umd.js',
|
||||||
|
'@angular/platform-browser': 'ng:platform-browser-builds/master/bundles/platform-browser.umd.js',
|
||||||
|
'@angular/platform-browser-dynamic': 'ng:platform-browser-dynamic-builds/master/bundles/platform-browser-dynamic.umd.js',
|
||||||
|
'@angular/http': 'ng:http-builds/master/bundles/http.umd.js',
|
||||||
|
'@angular/router': 'ng:router-builds/master/bundles/router.umd.js',
|
||||||
|
'@angular/forms': 'ng:forms-builds/master/bundles/forms.umd.js',
|
||||||
|
|
||||||
|
// angular testing umd bundles
|
||||||
|
'@angular/core/testing': 'ng:core-builds/master/bundles/core-testing.umd.js',
|
||||||
|
'@angular/common/testing': 'ng:common-builds/master/bundles/common-testing.umd.js',
|
||||||
|
'@angular/compiler/testing': 'ng:compiler-builds/master/bundles/compiler-testing.umd.js',
|
||||||
|
'@angular/platform-browser/testing': 'ng:platform-browser-builds/master/bundles/platform-browser-testing.umd.js',
|
||||||
|
'@angular/platform-browser-dynamic/testing': 'ng:platform-browser-dynamic-builds/master/bundles/platform-browser-dynamic-testing.umd.js',
|
||||||
|
'@angular/http/testing': 'ng:http-builds/master/bundles/http-testing.umd.js',
|
||||||
|
'@angular/router/testing': 'ng:router-builds/master/bundles/router-testing.umd.js',
|
||||||
|
'@angular/forms/testing': 'ng:forms-builds/master/bundles/forms-testing.umd.js',
|
||||||
|
|
||||||
|
// other libraries
|
||||||
|
'rxjs': 'npm:rxjs',
|
||||||
|
'angular2-in-memory-web-api': 'npm:angular2-in-memory-web-api',
|
||||||
|
'ts': 'npm:plugin-typescript@4.0.10/lib/plugin.js',
|
||||||
|
'typescript': 'npm:typescript@1.9.0-dev.20160409/lib/typescript.js',
|
||||||
|
|
||||||
|
},
|
||||||
|
// packages tells the System loader how to load when no filename and/or no extension
|
||||||
|
packages: {
|
||||||
|
app: {
|
||||||
|
main: './main.ts',
|
||||||
|
defaultExtension: 'ts'
|
||||||
|
},
|
||||||
|
rxjs: {
|
||||||
|
defaultExtension: 'js'
|
||||||
|
},
|
||||||
|
'angular2-in-memory-web-api': {
|
||||||
|
main: './index.js',
|
||||||
|
defaultExtension: 'js'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
})(this);
|
})(this);
|
||||||
|
|
|
@ -1,62 +1,11 @@
|
||||||
/**
|
/**
|
||||||
* PLUNKER VERSION (based on systemjs.config.js in angular.io)
|
* PLUNKER VERSION
|
||||||
|
* (based on systemjs.config.js in angular.io)
|
||||||
* 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.
|
||||||
*/
|
*/
|
||||||
(function (global) {
|
(function (global) {
|
||||||
|
System.config({
|
||||||
var ngVer = '@2.0.0-rc.6'; // lock in the angular package version; do not let it float to current!
|
|
||||||
var routerVer = '@3.0.0-rc.2'; // lock router version
|
|
||||||
var routerDeprecatedVer = '@2.0.0-rc.2'; // temporarily until we update all the guides
|
|
||||||
|
|
||||||
//map tells the System loader where to look for things
|
|
||||||
var map = {
|
|
||||||
'app': 'app',
|
|
||||||
|
|
||||||
'@angular': 'https://unpkg.com/@angular', // sufficient if we didn't pin the version
|
|
||||||
'@angular/router': 'https://unpkg.com/@angular/router' + routerVer,
|
|
||||||
'@angular/router-deprecated': 'https://unpkg.com/@angular/router-deprecated' + routerDeprecatedVer,
|
|
||||||
'angular2-in-memory-web-api': 'https://unpkg.com/angular2-in-memory-web-api', // get latest
|
|
||||||
'rxjs': 'https://unpkg.com/rxjs@5.0.0-beta.11',
|
|
||||||
'ts': 'https://unpkg.com/plugin-typescript@4.0.10/lib/plugin.js',
|
|
||||||
'typescript': 'https://unpkg.com/typescript@1.9.0-dev.20160409/lib/typescript.js',
|
|
||||||
};
|
|
||||||
|
|
||||||
//packages tells the System loader how to load when no filename and/or no extension
|
|
||||||
var packages = {
|
|
||||||
'app': { main: 'main.ts', defaultExtension: 'ts' },
|
|
||||||
'rxjs': { defaultExtension: 'js' },
|
|
||||||
'angular2-in-memory-web-api': { main: 'index.js', defaultExtension: 'js' },
|
|
||||||
};
|
|
||||||
|
|
||||||
var ngPackageNames = [
|
|
||||||
'common',
|
|
||||||
'compiler',
|
|
||||||
'core',
|
|
||||||
'forms',
|
|
||||||
'http',
|
|
||||||
'platform-browser',
|
|
||||||
'platform-browser-dynamic',
|
|
||||||
'upgrade',
|
|
||||||
];
|
|
||||||
|
|
||||||
// Add map entries for each angular package
|
|
||||||
// only because we're pinning the version with `ngVer`.
|
|
||||||
ngPackageNames.forEach(function(pkgName) {
|
|
||||||
map['@angular/'+pkgName] = 'https://unpkg.com/@angular/' + pkgName + ngVer;
|
|
||||||
});
|
|
||||||
|
|
||||||
// Add package entries for angular packages
|
|
||||||
ngPackageNames.concat(['router', 'router-deprecated']).forEach(function(pkgName) {
|
|
||||||
|
|
||||||
// Bundled (~40 requests):
|
|
||||||
packages['@angular/'+pkgName] = { main: '/bundles/' + pkgName + '.umd.js' };
|
|
||||||
|
|
||||||
// Individual files (~300 requests):
|
|
||||||
//packages['@angular/'+pkgName] = { main: 'index.js', defaultExtension: 'js' };
|
|
||||||
});
|
|
||||||
|
|
||||||
var config = {
|
|
||||||
// DEMO ONLY! REAL CODE SHOULD NOT TRANSPILE IN THE BROWSER
|
// DEMO ONLY! REAL CODE SHOULD NOT TRANSPILE IN THE BROWSER
|
||||||
transpiler: 'ts',
|
transpiler: 'ts',
|
||||||
typescriptOptions: {
|
typescriptOptions: {
|
||||||
|
@ -67,10 +16,55 @@
|
||||||
"exports": "ts"
|
"exports": "ts"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
map: map,
|
paths: {
|
||||||
packages: packages
|
// paths serve as alias
|
||||||
};
|
'npm:': 'https://unpkg.com/'
|
||||||
|
},
|
||||||
|
// map tells the System loader where to look for things
|
||||||
|
map: {
|
||||||
|
// our app is within the app folder
|
||||||
|
app: 'app',
|
||||||
|
|
||||||
System.config(config);
|
// angular bundles
|
||||||
|
'@angular/core': 'npm:@angular/core/bundles/core.umd.js',
|
||||||
|
'@angular/common': 'npm:@angular/common/bundles/common.umd.js',
|
||||||
|
'@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
|
||||||
|
'@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
|
||||||
|
'@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
|
||||||
|
'@angular/http': 'npm:@angular/http/bundles/http.umd.js',
|
||||||
|
'@angular/router': 'npm:@angular/router/bundles/router.umd.js',
|
||||||
|
'@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',
|
||||||
|
|
||||||
|
// angular testing umd bundles
|
||||||
|
'@angular/core/testing': 'npm:@angular/core/bundles/core-testing.umd.js',
|
||||||
|
'@angular/common/testing': 'npm:@angular/common/bundles/common-testing.umd.js',
|
||||||
|
'@angular/compiler/testing': 'npm:@angular/compiler/bundles/compiler-testing.umd.js',
|
||||||
|
'@angular/platform-browser/testing': 'npm:@angular/platform-browser/bundles/platform-browser-testing.umd.js',
|
||||||
|
'@angular/platform-browser-dynamic/testing': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic-testing.umd.js',
|
||||||
|
'@angular/http/testing': 'npm:@angular/http/bundles/http-testing.umd.js',
|
||||||
|
'@angular/router/testing': 'npm:@angular/router/bundles/router-testing.umd.js',
|
||||||
|
'@angular/forms/testing': 'npm:@angular/forms/bundles/forms-testing.umd.js',
|
||||||
|
|
||||||
|
// other libraries
|
||||||
|
'rxjs': 'npm:rxjs',
|
||||||
|
'angular2-in-memory-web-api': 'npm:angular2-in-memory-web-api',
|
||||||
|
'ts': 'npm:plugin-typescript@4.0.10/lib/plugin.js',
|
||||||
|
'typescript': 'npm:typescript@1.9.0-dev.20160409/lib/typescript.js',
|
||||||
|
|
||||||
|
},
|
||||||
|
// packages tells the System loader how to load when no filename and/or no extension
|
||||||
|
packages: {
|
||||||
|
app: {
|
||||||
|
main: './main.ts',
|
||||||
|
defaultExtension: 'ts'
|
||||||
|
},
|
||||||
|
rxjs: {
|
||||||
|
defaultExtension: 'js'
|
||||||
|
},
|
||||||
|
'angular2-in-memory-web-api': {
|
||||||
|
main: './index.js',
|
||||||
|
defaultExtension: 'js'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
})(this);
|
})(this);
|
||||||
|
|
|
@ -26,7 +26,11 @@ var _rxRules = {
|
||||||
system_extra_defaultExtension: {
|
system_extra_defaultExtension: {
|
||||||
from: /defaultExtension:\s*[\'|\"]js[\'|\"]/,
|
from: /defaultExtension:\s*[\'|\"]js[\'|\"]/,
|
||||||
to: 'defaultExtension: "ts"'
|
to: 'defaultExtension: "ts"'
|
||||||
}
|
},
|
||||||
|
zone_pkg: {
|
||||||
|
from: /src=".?node_modules\/zone.js\/dist\/(.*)"/g,
|
||||||
|
to: 'src="https://unpkg.com/zone.js/dist/$1?main=browser"'
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
var _rxData = [
|
var _rxData = [
|
||||||
|
@ -63,14 +67,44 @@ var _rxData = [
|
||||||
from: 'node_modules/angular/in-memory-web-api/web-api.js',
|
from: 'node_modules/angular/in-memory-web-api/web-api.js',
|
||||||
to: 'https://unpkg.com/angular/in-memory-web-api/web-api.js'
|
to: 'https://unpkg.com/angular/in-memory-web-api/web-api.js'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Test libraries
|
||||||
|
|
||||||
|
// Plunker recommends getting jasmine from cloudfare
|
||||||
|
{
|
||||||
|
pattern: 'script',
|
||||||
|
from: 'node_modules/jasmine-core/lib/jasmine-core/jasmine.js',
|
||||||
|
to: 'https://cdnjs.cloudflare.com/ajax/libs/jasmine/2.4.1/jasmine.js'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
pattern: 'script',
|
||||||
|
from: 'node_modules/jasmine-core/lib/jasmine-core/jasmine-html.js',
|
||||||
|
to: 'https://cdnjs.cloudflare.com/ajax/libs/jasmine/2.4.1/jasmine-html.js'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
pattern: 'script',
|
||||||
|
from: 'node_modules/jasmine-core/lib/jasmine-core/boot.js',
|
||||||
|
to: 'https://cdnjs.cloudflare.com/ajax/libs/jasmine/2.4.1/boot.js'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
pattern: 'link',
|
||||||
|
from: 'node_modules/jasmine-core/lib/jasmine-core/jasmine.css',
|
||||||
|
to: 'https://cdnjs.cloudflare.com/ajax/libs/jasmine/2.4.1/jasmine.css'
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
pattern: 'link',
|
pattern: 'link',
|
||||||
from: 'node_modules/bootstrap/dist/css/bootstrap.min.css',
|
from: 'node_modules/bootstrap/dist/css/bootstrap.min.css',
|
||||||
to: 'https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/css/bootstrap.min.css'
|
// Official source per http://getbootstrap.com/getting-started/
|
||||||
|
to: 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
pattern: 'angular_pkg',
|
pattern: 'angular_pkg',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
pattern: 'zone_pkg',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
pattern: 'system_extra_main'
|
pattern: 'system_extra_main'
|
||||||
},
|
},
|
||||||
|
@ -80,6 +114,7 @@ var _rxData = [
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
// var first_time = true; // DIAGNOSTIC
|
||||||
|
|
||||||
function translate(html) {
|
function translate(html) {
|
||||||
_rxData.forEach(function(rxDatum) {
|
_rxData.forEach(function(rxDatum) {
|
||||||
|
@ -102,6 +137,17 @@ function translate(html) {
|
||||||
});
|
});
|
||||||
rxTo = to.join("\n ");
|
rxTo = to.join("\n ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* DIAGNOSTIC
|
||||||
|
if (first_time && rxDatum.pattern === 'zone_pkg') {
|
||||||
|
first_time = false;
|
||||||
|
|
||||||
|
console.log('zone_pkg');
|
||||||
|
console.log(' rxFrom: '+rxFrom);
|
||||||
|
console.log(' rxTo: '+rxTo);
|
||||||
|
console.log(' replace: ' + html.replace(rxFrom, rxTo ));
|
||||||
|
}
|
||||||
|
*/
|
||||||
html = html.replace(rxFrom, rxTo );
|
html = html.replace(rxFrom, rxTo );
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue