From 84490ae0351f383deb19591e2de1c329df2d0d99 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Thu, 19 May 2016 16:52:22 -0700 Subject: [PATCH] perf: move es6-shim to core-js (new stuff only) Fixes #851. --- addon/ng2/blueprints/ng2/files/angular-cli-build.js | 2 +- addon/ng2/blueprints/ng2/files/config/karma.conf.js | 2 +- addon/ng2/blueprints/ng2/files/package.json | 2 +- lib/broccoli/angular2-app.js | 2 +- tests/e2e/e2e_workflow.spec.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/addon/ng2/blueprints/ng2/files/angular-cli-build.js b/addon/ng2/blueprints/ng2/files/angular-cli-build.js index dad887ff3dba..ad98af37726c 100644 --- a/addon/ng2/blueprints/ng2/files/angular-cli-build.js +++ b/addon/ng2/blueprints/ng2/files/angular-cli-build.js @@ -8,7 +8,7 @@ module.exports = function(defaults) { 'systemjs/dist/system-polyfills.js', 'systemjs/dist/system.src.js', 'zone.js/dist/**/*.+(js|js.map)', - 'es6-shim/es6-shim.js', + 'core-js/client/shim.min.+(js|js.map)', 'reflect-metadata/**/*.+(js|js.map)', 'rxjs/**/*.+(js|js.map)', '@angular/**/*.+(js|js.map)' diff --git a/addon/ng2/blueprints/ng2/files/config/karma.conf.js b/addon/ng2/blueprints/ng2/files/config/karma.conf.js index d39036fa52ff..3c385a84434a 100644 --- a/addon/ng2/blueprints/ng2/files/config/karma.conf.js +++ b/addon/ng2/blueprints/ng2/files/config/karma.conf.js @@ -14,7 +14,7 @@ module.exports = function (config) { } }, files: [ - { pattern: 'dist/vendor/es6-shim/es6-shim.js', included: true, watched: false }, + { pattern: 'dist/vendor/core-js/client/shim.min.js', included: true, watched: false }, { pattern: 'dist/vendor/zone.js/dist/zone.js', included: true, watched: false }, { pattern: 'dist/vendor/reflect-metadata/Reflect.js', included: true, watched: false }, { pattern: 'dist/vendor/systemjs/dist/system-polyfills.js', included: true, watched: false }, diff --git a/addon/ng2/blueprints/ng2/files/package.json b/addon/ng2/blueprints/ng2/files/package.json index 9abe9078534c..e6b0c83152a4 100644 --- a/addon/ng2/blueprints/ng2/files/package.json +++ b/addon/ng2/blueprints/ng2/files/package.json @@ -20,7 +20,7 @@ "@angular/platform-browser": "2.0.0-rc.1", "@angular/platform-browser-dynamic": "2.0.0-rc.1", "@angular/router": "2.0.0-rc.1", - "es6-shim": "^0.35.0", + "core-js": "2.4.0", "reflect-metadata": "0.1.3", "rxjs": "5.0.0-beta.6", "systemjs": "0.19.26", diff --git a/lib/broccoli/angular2-app.js b/lib/broccoli/angular2-app.js index 328163be57a3..4d4a3a5b204e 100644 --- a/lib/broccoli/angular2-app.js +++ b/lib/broccoli/angular2-app.js @@ -33,7 +33,7 @@ class Angular2App extends BroccoliPlugin { || (this.ngConfig.defaults && this.ngConfig.defaults.sourceDir) || 'src'; this._options.polyfills = this._options.polyfills || [ - 'vendor/es6-shim/es6-shim.js', + 'vendor/core-js/client/shim.min.js', 'vendor/reflect-metadata/Reflect.js', 'vendor/systemjs/dist/system.src.js', 'vendor/zone.js/dist/zone.js' diff --git a/tests/e2e/e2e_workflow.spec.js b/tests/e2e/e2e_workflow.spec.js index a9be368dcb17..ba7a88bca827 100644 --- a/tests/e2e/e2e_workflow.spec.js +++ b/tests/e2e/e2e_workflow.spec.js @@ -88,7 +88,7 @@ describe('Basic end-to-end Workflow', function () { // Check the index.html to have no handlebar tokens in it. const indexHtml = fs.readFileSync(path.join(process.cwd(), 'dist/index.html'), 'utf-8'); expect(indexHtml).to.not.include('{{'); - expect(indexHtml).to.include('vendor/es6-shim/es6-shim.js'); + expect(indexHtml).to.include('vendor/core-js/client/shim.min.js'); }) .then(function () { // Also does not create new things in GIT.