From 112e777b903bbfc29a79acea11cf7b622f641993 Mon Sep 17 00:00:00 2001 From: Ward Bell Date: Wed, 6 Sep 2017 17:40:32 -0700 Subject: [PATCH] build(aio): update karma & systemjs config for HttpClient MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit While adding the references to the `HttpClient` packages it also crucially adds ref to new “tslib” library required by `HttpClient`. --- aio/content/examples/testing/karma-test-shim.js | 1 + aio/content/examples/testing/karma.conf.js | 4 ++++ aio/tools/examples/shared/boilerplate/src/systemjs.config.js | 2 ++ .../shared/boilerplate/src/systemjs.config.web.build.js | 3 +++ .../examples/shared/boilerplate/src/systemjs.config.web.js | 2 ++ 5 files changed, 12 insertions(+) diff --git a/aio/content/examples/testing/karma-test-shim.js b/aio/content/examples/testing/karma-test-shim.js index 1b8d6acdd4..6030abfd3d 100644 --- a/aio/content/examples/testing/karma-test-shim.js +++ b/aio/content/examples/testing/karma-test-shim.js @@ -44,6 +44,7 @@ System.config({ map: { '@angular/core/testing': 'npm:@angular/core/bundles/core-testing.umd.js', '@angular/common/testing': 'npm:@angular/common/bundles/common-testing.umd.js', + '@angular/common/http/testing': 'npm:@angular/common/bundles/common-http-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', diff --git a/aio/content/examples/testing/karma.conf.js b/aio/content/examples/testing/karma.conf.js index a00b8add54..d0bb2e3f3c 100644 --- a/aio/content/examples/testing/karma.conf.js +++ b/aio/content/examples/testing/karma.conf.js @@ -52,6 +52,10 @@ module.exports = function(config) { { pattern: 'node_modules/rxjs/**/*.js', included: false, watched: false }, { pattern: 'node_modules/rxjs/**/*.js.map', included: false, watched: false }, + // tslib (TS helper fns such as `__extends`) + { pattern: 'node_modules/tslib/**/*.js', included: false, watched: false }, + { pattern: 'node_modules/tslib/**/*.js.map', included: false, watched: false }, + // Paths loaded via module imports: // Angular itself { pattern: 'node_modules/@angular/**/*.js', included: false, watched: false }, diff --git a/aio/tools/examples/shared/boilerplate/src/systemjs.config.js b/aio/tools/examples/shared/boilerplate/src/systemjs.config.js index ea7a3879ac..30d4e549ee 100644 --- a/aio/tools/examples/shared/boilerplate/src/systemjs.config.js +++ b/aio/tools/examples/shared/boilerplate/src/systemjs.config.js @@ -18,6 +18,7 @@ '@angular/animations/browser': 'npm:@angular/animations/bundles/animations-browser.umd.js', '@angular/core': 'npm:@angular/core/bundles/core.umd.js', '@angular/common': 'npm:@angular/common/bundles/common.umd.js', + '@angular/common/http': 'npm:@angular/common/bundles/common-http.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/animations': 'npm:@angular/platform-browser/bundles/platform-browser-animations.umd.js', @@ -31,6 +32,7 @@ // other libraries 'rxjs': 'npm:rxjs', + 'tslib': 'npm:tslib/tslib.js', 'angular-in-memory-web-api': 'npm:angular-in-memory-web-api/bundles/in-memory-web-api.umd.js' }, // packages tells the System loader how to load when no filename and/or no extension diff --git a/aio/tools/examples/shared/boilerplate/src/systemjs.config.web.build.js b/aio/tools/examples/shared/boilerplate/src/systemjs.config.web.build.js index 50b5ee2aa1..14b1d49e79 100644 --- a/aio/tools/examples/shared/boilerplate/src/systemjs.config.web.build.js +++ b/aio/tools/examples/shared/boilerplate/src/systemjs.config.web.build.js @@ -42,6 +42,7 @@ '@angular/animations/browser': 'ng:animations-builds/master/bundles/animations-browser.umd.js', '@angular/core': 'ng:core-builds/master/bundles/core.umd.js', '@angular/common': 'ng:common-builds/master/bundles/common.umd.js', + '@angular/common/http': 'ng:common-builds/master/bundles/common-http.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/animations': 'ng:animations-builds/master/bundles/platform-browser-animations.umd.js', @@ -56,6 +57,7 @@ // angular testing umd bundles (overwrite the shim mappings) '@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/common/http/testing': 'ng:common-builds/master/bundles/common-http-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', @@ -65,6 +67,7 @@ // other libraries 'rxjs': 'npm:rxjs@5.0.1', + 'tslib': 'npm:tslib/tslib.js', 'angular-in-memory-web-api': 'npm:angular-in-memory-web-api/bundles/in-memory-web-api.umd.js', 'ts': 'npm:plugin-typescript@5.2.7/lib/plugin.js', 'typescript': 'npm:typescript@2.3.2/lib/typescript.js', diff --git a/aio/tools/examples/shared/boilerplate/src/systemjs.config.web.js b/aio/tools/examples/shared/boilerplate/src/systemjs.config.web.js index 97b8244b1d..2894f7f886 100644 --- a/aio/tools/examples/shared/boilerplate/src/systemjs.config.web.js +++ b/aio/tools/examples/shared/boilerplate/src/systemjs.config.web.js @@ -39,6 +39,7 @@ '@angular/animations/browser': 'npm:@angular/animations/bundles/animations-browser.umd.js', '@angular/core': 'npm:@angular/core/bundles/core.umd.js', '@angular/common': 'npm:@angular/common/bundles/common.umd.js', + '@angular/common/http': 'npm:@angular/common/bundles/common-http.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/animations': 'npm:@angular/platform-browser/bundles/platform-browser-animations.umd.js', @@ -52,6 +53,7 @@ // other libraries 'rxjs': 'npm:rxjs@5.0.1', + 'tslib': 'npm:tslib/tslib.js', 'angular-in-memory-web-api': 'npm:angular-in-memory-web-api/bundles/in-memory-web-api.umd.js', 'ts': 'npm:plugin-typescript@5.2.7/lib/plugin.js', 'typescript': 'npm:typescript@2.3.2/lib/typescript.js',