From 8afdc93275a376b99cfdd321aaffc94a7ed0b703 Mon Sep 17 00:00:00 2001 From: guybedford Date: Tue, 24 Jan 2017 14:00:03 +0200 Subject: [PATCH] upgrade es-module-loader, angular test, ensure System is written still --- package.json | 2 +- src/system.js | 19 ++----------------- test/angular.html | 37 +++++++++++++++++++++++++++++++++++++ test/app/app.component.ts | 14 ++++++++++++++ 4 files changed, 54 insertions(+), 18 deletions(-) create mode 100644 test/angular.html create mode 100644 test/app/app.component.ts diff --git a/package.json b/package.json index bacd8fa5b..ee4c0e0bb 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "babel-plugin-syntax-dynamic-import": "^6.18.0", "babel-plugin-transform-es2015-modules-systemjs": "^6.19.0", "bluebird": "^3.4.6", - "es-module-loader": "ModuleLoader/es-module-loader#next", + "es-module-loader": "^2.0.0", "mocha": "^3.1.2", "plugin-typescript": "^5.2.7", "rollup": "^0.41.1", diff --git a/src/system.js b/src/system.js index a0a06f986..4ae72893b 100644 --- a/src/system.js +++ b/src/system.js @@ -6,23 +6,8 @@ SystemJSLoader.prototype.version = VERSION; var System = new SystemJSLoader(); // only set the global System on the global in browsers -if (isBrowser || isWorker) { - global.SystemJS = System; - - // dont override an existing System global - if (!global.System) { - global.System = System; - } - // rather just extend or set a System.register on the existing System global - else { - var register = global.System.register; - global.System.register = function () { - if (register) - register.apply(this, arguments); - System.register.apply(this, arguments); - }; - } -} +if (isBrowser || isWorker) + global.SystemJS = global.System = System; if (typeof module !== 'undefined' && module.exports) module.exports = System; diff --git a/test/angular.html b/test/angular.html new file mode 100644 index 000000000..19d1e463b --- /dev/null +++ b/test/angular.html @@ -0,0 +1,37 @@ + + + + Hello Angular + + + + + + + + + + + + + + + + + + + Loading AppComponent content here ... + + + + + + diff --git a/test/app/app.component.ts b/test/app/app.component.ts new file mode 100644 index 000000000..d4ce86968 --- /dev/null +++ b/test/app/app.component.ts @@ -0,0 +1,14 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'my-app', + template: `

Hello {{name}}

` +}) +export class AppComponent { name = 'Angular'; } + + +/* +Copyright 2016 Google Inc. All Rights Reserved. +Use of this source code is governed by an MIT-style license that +can be found in the LICENSE file at http://angular.io/license +*/