chore: more conversion of es6-shim to core-js

This commit is contained in:
Ward Bell 2016-05-19 23:18:18 -07:00
parent 6e0f80c673
commit 3423ad8491
27 changed files with 36 additions and 42 deletions

View File

@ -9,17 +9,17 @@
<!-- 1. Load libraries -->
<!-- Polyfill(s) for older browsers -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/es6-shim/0.35.0/es6-shim.min.js"></script>
<script src="https://npmcdn.com/core-js/client/shim.min.js"></script>
<script src="https://npmcdn.com/zone.js@0.6.12"></script>
<script src="https://npmcdn.com/reflect-metadata@0.1.3"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.27/system.js"></script>
<script src="https://npmcdn.com/systemjs@0.19.27/dist/system.src.js"></script>
<script src="https://npmcdn.com/typescript@1.8.10/lib/typescript.js"></script>
<!-- 2. Configure SystemJS -->
<script src="systemjs.config.js"></script>
<script>
System.import('app').catch(function(err){ console.error(err); });
System.import('app').catch(function(err){ console.error(err); });
</script>
</head>

View File

@ -10,17 +10,17 @@
<!-- 1. Load libraries -->
<!-- Polyfill(s) for older browsers -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/es6-shim/0.35.0/es6-shim.min.js"></script>
<script src="https://npmcdn.com/core-js/client/shim.min.js"></script>
<script src="https://npmcdn.com/zone.js@0.6.12"></script>
<script src="https://npmcdn.com/reflect-metadata@0.1.3"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.27/system.js"></script>
<script src="https://npmcdn.com/systemjs@0.19.27/dist/system.src.js"></script>
<script src="https://npmcdn.com/typescript@1.8.10/lib/typescript.js"></script>
<!-- 2. Configure SystemJS -->
<script src="systemjs.config.js"></script>
<script>
System.import('app').catch(function(err){ console.error(err); });
System.import('app').catch(function(err){ console.error(err); });
</script>
</head>

View File

@ -10,17 +10,17 @@
<!-- 1. Load libraries -->
<!-- Polyfill(s) for older browsers -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/es6-shim/0.35.0/es6-shim.min.js"></script>
<script src="https://npmcdn.com/core-js/client/shim.min.js"></script>
<script src="https://npmcdn.com/zone.js@0.6.12"></script>
<script src="https://npmcdn.com/reflect-metadata@0.1.3"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.27/system.js"></script>
<script src="https://npmcdn.com/systemjs@0.19.27/dist/system.src.js"></script>
<script src="https://npmcdn.com/typescript@1.8.10/lib/typescript.js"></script>
<!-- 2. Configure SystemJS -->
<script src="systemjs.config.js"></script>
<script>
System.import('app').catch(function(err){ console.error(err); });
System.import('app').catch(function(err){ console.error(err); });
</script>
</head>

View File

@ -22,7 +22,7 @@ module.exports = function(config) {
},
files: [
// Polyfills.
'node_modules/es6-shim/es6-shim.js',
'node_modules/code-js/client/shim.min.js',
// Zone.js dependencies
// Note - do not include zone.js itself here, it is already

View File

@ -38,7 +38,7 @@
"rxjs": "5.0.0-beta.6",
"zone.js": "^0.6.12",
"angular2-in-memory-web-api": "0.0.8",
"angular2-in-memory-web-api": "0.0.9",
"bootstrap": "^3.3.6"
},
"devDependencies": {

View File

@ -27,7 +27,7 @@
"rxjs": "5.0.0-beta.6",
"zone.js": "^0.6.12",
"angular2-in-memory-web-api": "0.0.8",
"angular2-in-memory-web-api": "0.0.9",
"bootstrap": "^3.3.6"
},
"devDependencies": {

View File

@ -11,8 +11,7 @@
"dependencies": {
"angular2": "2.0.0-beta.0",
"systemjs": "0.19.6",
"es6-promise": "^3.0.2",
"es6-shim": "^0.35.0",
"core-js": "^2.4.0",
"reflect-metadata": "0.1.2",
"rxjs": "5.0.0-beta.0",
"zone.js": "0.5.10"

View File

@ -17,7 +17,7 @@
<script src="systemjs.config.js"></script>
<script>
System.import('app').catch(function(err){ console.error(err); });
System.import('app').catch(function(err){ console.error(err); });
</script>
<script>
System.import('app/1-2-hybrid-bootstrap/app.module')

View File

@ -17,7 +17,7 @@
<script src="systemjs.config.js"></script>
<script>
System.import('app').catch(function(err){ console.error(err); });
System.import('app').catch(function(err){ console.error(err); });
</script>
<script>
System.import('app/1-2-hybrid-shared-adapter-bootstrap/app.module')

View File

@ -17,7 +17,7 @@
<script src="systemjs.config.js"></script>
<script>
System.import('app').catch(function(err){ console.error(err); });
System.import('app').catch(function(err){ console.error(err); });
</script>
<script>
System.import('app/1-to-2-projection/app.module')

View File

@ -17,7 +17,7 @@
<script src="systemjs.config.js"></script>
<script>
System.import('app').catch(function(err){ console.error(err); });
System.import('app').catch(function(err){ console.error(err); });
</script>
<script>
System.import('app/1-to-2-providers/app.module')

View File

@ -17,7 +17,7 @@
<script src="systemjs.config.js"></script>
<script>
System.import('app').catch(function(err){ console.error(err); });
System.import('app').catch(function(err){ console.error(err); });
</script>
<script>
System.import('app/2-to-1-providers/app.module')

View File

@ -17,7 +17,7 @@
<script src="systemjs.config.js"></script>
<script>
System.import('app').catch(function(err){ console.error(err); });
System.import('app').catch(function(err){ console.error(err); });
</script>
<script>
System.import('app/2-to-1-transclusion/app.module')

View File

@ -17,7 +17,7 @@
<script src="systemjs.config.js"></script>
<script>
System.import('app').catch(function(err){ console.error(err); });
System.import('app').catch(function(err){ console.error(err); });
</script>
<script>
System.import('app/downgrade-io/app.module')

View File

@ -17,7 +17,7 @@
<script src="systemjs.config.js"></script>
<script>
System.import('app').catch(function(err){ console.error(err); });
System.import('app').catch(function(err){ console.error(err); });
</script>
<script>
System.import('app/downgrade-static/app.module')

View File

@ -17,7 +17,7 @@
<script src="systemjs.config.js"></script>
<script>
System.import('app').catch(function(err){ console.error(err); });
System.import('app').catch(function(err){ console.error(err); });
</script>
<script>
System.import('app/upgrade-io/app.module')

View File

@ -17,7 +17,7 @@
<script src="systemjs.config.js"></script>
<script>
System.import('app').catch(function(err){ console.error(err); });
System.import('app').catch(function(err){ console.error(err); });
</script>
<script>
System.import('app/upgrade-static/app.module')

View File

@ -16,7 +16,7 @@
"@angular/router-deprecated": "2.0.0-rc.1",
"@angular/upgrade": "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",
"zone.js": "0.6.12",

View File

@ -12,7 +12,7 @@ module.exports = function(config){
'app/bower_components/angular-animate/angular-animate.js',
'app/bower_components/angular-mocks/angular-mocks.js',
'node_modules/systemjs/dist/system-polyfills.js',
'node_modules/es6-shim/es6-shim.js',
'node_modules/core-js/client/shim.min.js',
'node_modules/zone.js/dist/zone.js',
'node_modules/reflect-metadata/Reflect.js',
'node_modules/systemjs/dist/system.src.js',

View File

@ -16,7 +16,7 @@
"@angular/router-deprecated": "2.0.0-rc.1",
"@angular/upgrade": "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",
"zone.js": "0.6.12",

View File

@ -6,7 +6,7 @@ module.exports = function(config){
files : [
'node_modules/systemjs/dist/system-polyfills.js',
'node_modules/es6-shim/es6-shim.js',
'node_modules/core-js/client/shim.min.js',
'node_modules/zone.js/dist/zone.js',
'node_modules/reflect-metadata/Reflect.js',
'node_modules/systemjs/dist/system.src.js',

View File

@ -16,7 +16,7 @@
"@angular/router-deprecated": "2.0.0-rc.1",
"@angular/upgrade": "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",
"zone.js": "0.6.12",

View File

@ -14,7 +14,7 @@ module.exports = function(config){
'node_modules/systemjs/dist/system-polyfills.js',
'node_modules/systemjs/dist/system.src.js',
// #docregion ng2
'node_modules/es6-shim/es6-shim.js',
'node_modules/core-js/client/shim.min.js',
'node_modules/zone.js/dist/zone.js',
'node_modules/reflect-metadata/Reflect.js',
{pattern: 'node_modules/rxjs/**/*.js', included: false, watched: false},

View File

@ -10,7 +10,7 @@ module.exports = function () {
{pattern: 'node_modules/systemjs/dist/system.js', instrument: false},
// Polyfills
{pattern: 'node_modules/es6-shim/es6-shim.js', instrument: false},
{pattern: 'node_modules/code-js/client/shim.min.js', instrument: false},
{pattern: 'node_modules/angular2/bundles/angular2-polyfills.js', instrument: false},
// Zone.js dependencies

View File

@ -97,7 +97,7 @@ a(id="typings")
:marked
We identified three *typings* file in the QuickStart, the *d.ts* files for
* [es6-shim](https://github.com/paulmillr/es6-shim/blob/master/README.md)
* [core-js](https://github.com/zloirock/core-js/blob/master/README.md)
that brings ES2015/ES6 capabilities to our ES5 browsers
* [jasmine](http://jasmine.github.io/) typings for the Jasmine test framework
@ -145,7 +145,7 @@ code-example(format="").
.children
.file ambient
.children
.file es6-shim
.file core-js
.children
.file index.d.ts
.file ...
@ -155,7 +155,7 @@ code-example(format="").
.children
.file ambient
.children
.file es6-shim
.file core-js
.children
.file index.d.ts
.file ...
@ -163,7 +163,7 @@ code-example(format="").
.file browser.d.ts
.file main.d.ts
:marked
The `es6-shim` typings are duplicated and the `browser.d.ts` and `main.d.ts` have overlapping content.
The `core-js` typings are duplicated and the `browser.d.ts` and `main.d.ts` have overlapping content.
We must tell the compiler to ignore one or the other.
We removed the `main` set from consideration in the `exclude` section of our `tsconfig.json` file:

View File

@ -362,7 +362,7 @@ h2#index Step 4: Add #[code index.html]
We loaded the following scripts
+makeExcerpt('index.html', 'libraries')
:marked
We begin with core-js's es6-shim which monkey patches the global context (window) with essential features of ES2015 (ES6).
We begin with `core-js`'s ES2015/ES6 shim which monkey patches the global context (window) with essential features of ES2015 (ES6).
Next are the polyfills for Angular2, `zone.js` and `reflect-metadata`.
Then the [SystemJS](#systemjs) library for module loading.

View File

@ -33,15 +33,10 @@ var _rxData = [
{
pattern: 'basehref',
},
{
pattern: 'script',
from: 'node_modules/es6-shim/es6-shim.min.js',
to: 'https://npmcdn.com/es6-shim@0.35.0/es6-shim.min.js'
},
{
pattern: 'script',
from: 'node_modules/core-js/client/shim.min.js',
to: 'https://npmcdn.com/core-js@2.4.0/client/shim.min.js'
to: 'https://npmcdn.com/core-js/client/shim.min.js'
},
{
pattern: 'script',