chore: more conversion of es6-shim to core-js
This commit is contained in:
parent
6e0f80c673
commit
3423ad8491
|
@ -9,17 +9,17 @@
|
||||||
|
|
||||||
<!-- 1. Load libraries -->
|
<!-- 1. Load libraries -->
|
||||||
<!-- Polyfill(s) for older browsers -->
|
<!-- 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/zone.js@0.6.12"></script>
|
||||||
<script src="https://npmcdn.com/reflect-metadata@0.1.3"></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>
|
<script src="https://npmcdn.com/typescript@1.8.10/lib/typescript.js"></script>
|
||||||
|
|
||||||
<!-- 2. Configure SystemJS -->
|
<!-- 2. Configure SystemJS -->
|
||||||
<script src="systemjs.config.js"></script>
|
<script src="systemjs.config.js"></script>
|
||||||
<script>
|
<script>
|
||||||
System.import('app').catch(function(err){ console.error(err); });
|
System.import('app').catch(function(err){ console.error(err); });
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -10,17 +10,17 @@
|
||||||
|
|
||||||
<!-- 1. Load libraries -->
|
<!-- 1. Load libraries -->
|
||||||
<!-- Polyfill(s) for older browsers -->
|
<!-- 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/zone.js@0.6.12"></script>
|
||||||
<script src="https://npmcdn.com/reflect-metadata@0.1.3"></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>
|
<script src="https://npmcdn.com/typescript@1.8.10/lib/typescript.js"></script>
|
||||||
|
|
||||||
<!-- 2. Configure SystemJS -->
|
<!-- 2. Configure SystemJS -->
|
||||||
<script src="systemjs.config.js"></script>
|
<script src="systemjs.config.js"></script>
|
||||||
<script>
|
<script>
|
||||||
System.import('app').catch(function(err){ console.error(err); });
|
System.import('app').catch(function(err){ console.error(err); });
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -10,17 +10,17 @@
|
||||||
|
|
||||||
<!-- 1. Load libraries -->
|
<!-- 1. Load libraries -->
|
||||||
<!-- Polyfill(s) for older browsers -->
|
<!-- 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/zone.js@0.6.12"></script>
|
||||||
<script src="https://npmcdn.com/reflect-metadata@0.1.3"></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>
|
<script src="https://npmcdn.com/typescript@1.8.10/lib/typescript.js"></script>
|
||||||
|
|
||||||
<!-- 2. Configure SystemJS -->
|
<!-- 2. Configure SystemJS -->
|
||||||
<script src="systemjs.config.js"></script>
|
<script src="systemjs.config.js"></script>
|
||||||
<script>
|
<script>
|
||||||
System.import('app').catch(function(err){ console.error(err); });
|
System.import('app').catch(function(err){ console.error(err); });
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -22,7 +22,7 @@ module.exports = function(config) {
|
||||||
},
|
},
|
||||||
files: [
|
files: [
|
||||||
// Polyfills.
|
// Polyfills.
|
||||||
'node_modules/es6-shim/es6-shim.js',
|
'node_modules/code-js/client/shim.min.js',
|
||||||
|
|
||||||
// Zone.js dependencies
|
// Zone.js dependencies
|
||||||
// Note - do not include zone.js itself here, it is already
|
// Note - do not include zone.js itself here, it is already
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
"rxjs": "5.0.0-beta.6",
|
"rxjs": "5.0.0-beta.6",
|
||||||
"zone.js": "^0.6.12",
|
"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"
|
"bootstrap": "^3.3.6"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
"rxjs": "5.0.0-beta.6",
|
"rxjs": "5.0.0-beta.6",
|
||||||
"zone.js": "^0.6.12",
|
"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"
|
"bootstrap": "^3.3.6"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
|
@ -11,8 +11,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"angular2": "2.0.0-beta.0",
|
"angular2": "2.0.0-beta.0",
|
||||||
"systemjs": "0.19.6",
|
"systemjs": "0.19.6",
|
||||||
"es6-promise": "^3.0.2",
|
"core-js": "^2.4.0",
|
||||||
"es6-shim": "^0.35.0",
|
|
||||||
"reflect-metadata": "0.1.2",
|
"reflect-metadata": "0.1.2",
|
||||||
"rxjs": "5.0.0-beta.0",
|
"rxjs": "5.0.0-beta.0",
|
||||||
"zone.js": "0.5.10"
|
"zone.js": "0.5.10"
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
<script src="systemjs.config.js"></script>
|
<script src="systemjs.config.js"></script>
|
||||||
<script>
|
<script>
|
||||||
System.import('app').catch(function(err){ console.error(err); });
|
System.import('app').catch(function(err){ console.error(err); });
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
System.import('app/1-2-hybrid-bootstrap/app.module')
|
System.import('app/1-2-hybrid-bootstrap/app.module')
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
<script src="systemjs.config.js"></script>
|
<script src="systemjs.config.js"></script>
|
||||||
<script>
|
<script>
|
||||||
System.import('app').catch(function(err){ console.error(err); });
|
System.import('app').catch(function(err){ console.error(err); });
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
System.import('app/1-2-hybrid-shared-adapter-bootstrap/app.module')
|
System.import('app/1-2-hybrid-shared-adapter-bootstrap/app.module')
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
<script src="systemjs.config.js"></script>
|
<script src="systemjs.config.js"></script>
|
||||||
<script>
|
<script>
|
||||||
System.import('app').catch(function(err){ console.error(err); });
|
System.import('app').catch(function(err){ console.error(err); });
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
System.import('app/1-to-2-projection/app.module')
|
System.import('app/1-to-2-projection/app.module')
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
<script src="systemjs.config.js"></script>
|
<script src="systemjs.config.js"></script>
|
||||||
<script>
|
<script>
|
||||||
System.import('app').catch(function(err){ console.error(err); });
|
System.import('app').catch(function(err){ console.error(err); });
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
System.import('app/1-to-2-providers/app.module')
|
System.import('app/1-to-2-providers/app.module')
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
<script src="systemjs.config.js"></script>
|
<script src="systemjs.config.js"></script>
|
||||||
<script>
|
<script>
|
||||||
System.import('app').catch(function(err){ console.error(err); });
|
System.import('app').catch(function(err){ console.error(err); });
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
System.import('app/2-to-1-providers/app.module')
|
System.import('app/2-to-1-providers/app.module')
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
<script src="systemjs.config.js"></script>
|
<script src="systemjs.config.js"></script>
|
||||||
<script>
|
<script>
|
||||||
System.import('app').catch(function(err){ console.error(err); });
|
System.import('app').catch(function(err){ console.error(err); });
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
System.import('app/2-to-1-transclusion/app.module')
|
System.import('app/2-to-1-transclusion/app.module')
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
<script src="systemjs.config.js"></script>
|
<script src="systemjs.config.js"></script>
|
||||||
<script>
|
<script>
|
||||||
System.import('app').catch(function(err){ console.error(err); });
|
System.import('app').catch(function(err){ console.error(err); });
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
System.import('app/downgrade-io/app.module')
|
System.import('app/downgrade-io/app.module')
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
<script src="systemjs.config.js"></script>
|
<script src="systemjs.config.js"></script>
|
||||||
<script>
|
<script>
|
||||||
System.import('app').catch(function(err){ console.error(err); });
|
System.import('app').catch(function(err){ console.error(err); });
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
System.import('app/downgrade-static/app.module')
|
System.import('app/downgrade-static/app.module')
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
<script src="systemjs.config.js"></script>
|
<script src="systemjs.config.js"></script>
|
||||||
<script>
|
<script>
|
||||||
System.import('app').catch(function(err){ console.error(err); });
|
System.import('app').catch(function(err){ console.error(err); });
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
System.import('app/upgrade-io/app.module')
|
System.import('app/upgrade-io/app.module')
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
<script src="systemjs.config.js"></script>
|
<script src="systemjs.config.js"></script>
|
||||||
<script>
|
<script>
|
||||||
System.import('app').catch(function(err){ console.error(err); });
|
System.import('app').catch(function(err){ console.error(err); });
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
System.import('app/upgrade-static/app.module')
|
System.import('app/upgrade-static/app.module')
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
"@angular/router-deprecated": "2.0.0-rc.1",
|
"@angular/router-deprecated": "2.0.0-rc.1",
|
||||||
"@angular/upgrade": "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",
|
"reflect-metadata": "0.1.3",
|
||||||
"rxjs": "5.0.0-beta.6",
|
"rxjs": "5.0.0-beta.6",
|
||||||
"zone.js": "0.6.12",
|
"zone.js": "0.6.12",
|
||||||
|
|
|
@ -12,7 +12,7 @@ module.exports = function(config){
|
||||||
'app/bower_components/angular-animate/angular-animate.js',
|
'app/bower_components/angular-animate/angular-animate.js',
|
||||||
'app/bower_components/angular-mocks/angular-mocks.js',
|
'app/bower_components/angular-mocks/angular-mocks.js',
|
||||||
'node_modules/systemjs/dist/system-polyfills.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/zone.js/dist/zone.js',
|
||||||
'node_modules/reflect-metadata/Reflect.js',
|
'node_modules/reflect-metadata/Reflect.js',
|
||||||
'node_modules/systemjs/dist/system.src.js',
|
'node_modules/systemjs/dist/system.src.js',
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
"@angular/router-deprecated": "2.0.0-rc.1",
|
"@angular/router-deprecated": "2.0.0-rc.1",
|
||||||
"@angular/upgrade": "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",
|
"reflect-metadata": "0.1.3",
|
||||||
"rxjs": "5.0.0-beta.6",
|
"rxjs": "5.0.0-beta.6",
|
||||||
"zone.js": "0.6.12",
|
"zone.js": "0.6.12",
|
||||||
|
|
|
@ -6,7 +6,7 @@ module.exports = function(config){
|
||||||
|
|
||||||
files : [
|
files : [
|
||||||
'node_modules/systemjs/dist/system-polyfills.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/zone.js/dist/zone.js',
|
||||||
'node_modules/reflect-metadata/Reflect.js',
|
'node_modules/reflect-metadata/Reflect.js',
|
||||||
'node_modules/systemjs/dist/system.src.js',
|
'node_modules/systemjs/dist/system.src.js',
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
"@angular/router-deprecated": "2.0.0-rc.1",
|
"@angular/router-deprecated": "2.0.0-rc.1",
|
||||||
"@angular/upgrade": "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",
|
"reflect-metadata": "0.1.3",
|
||||||
"rxjs": "5.0.0-beta.6",
|
"rxjs": "5.0.0-beta.6",
|
||||||
"zone.js": "0.6.12",
|
"zone.js": "0.6.12",
|
||||||
|
|
|
@ -14,7 +14,7 @@ module.exports = function(config){
|
||||||
'node_modules/systemjs/dist/system-polyfills.js',
|
'node_modules/systemjs/dist/system-polyfills.js',
|
||||||
'node_modules/systemjs/dist/system.src.js',
|
'node_modules/systemjs/dist/system.src.js',
|
||||||
// #docregion ng2
|
// #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/zone.js/dist/zone.js',
|
||||||
'node_modules/reflect-metadata/Reflect.js',
|
'node_modules/reflect-metadata/Reflect.js',
|
||||||
{pattern: 'node_modules/rxjs/**/*.js', included: false, watched: false},
|
{pattern: 'node_modules/rxjs/**/*.js', included: false, watched: false},
|
||||||
|
|
|
@ -10,7 +10,7 @@ module.exports = function () {
|
||||||
{pattern: 'node_modules/systemjs/dist/system.js', instrument: false},
|
{pattern: 'node_modules/systemjs/dist/system.js', instrument: false},
|
||||||
|
|
||||||
// Polyfills
|
// 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},
|
{pattern: 'node_modules/angular2/bundles/angular2-polyfills.js', instrument: false},
|
||||||
|
|
||||||
// Zone.js dependencies
|
// Zone.js dependencies
|
||||||
|
|
|
@ -97,7 +97,7 @@ a(id="typings")
|
||||||
:marked
|
:marked
|
||||||
We identified three *typings* file in the QuickStart, the *d.ts* files for
|
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
|
that brings ES2015/ES6 capabilities to our ES5 browsers
|
||||||
|
|
||||||
* [jasmine](http://jasmine.github.io/) typings for the Jasmine test framework
|
* [jasmine](http://jasmine.github.io/) typings for the Jasmine test framework
|
||||||
|
@ -145,7 +145,7 @@ code-example(format="").
|
||||||
.children
|
.children
|
||||||
.file ambient
|
.file ambient
|
||||||
.children
|
.children
|
||||||
.file es6-shim
|
.file core-js
|
||||||
.children
|
.children
|
||||||
.file index.d.ts
|
.file index.d.ts
|
||||||
.file ...
|
.file ...
|
||||||
|
@ -155,7 +155,7 @@ code-example(format="").
|
||||||
.children
|
.children
|
||||||
.file ambient
|
.file ambient
|
||||||
.children
|
.children
|
||||||
.file es6-shim
|
.file core-js
|
||||||
.children
|
.children
|
||||||
.file index.d.ts
|
.file index.d.ts
|
||||||
.file ...
|
.file ...
|
||||||
|
@ -163,7 +163,7 @@ code-example(format="").
|
||||||
.file browser.d.ts
|
.file browser.d.ts
|
||||||
.file main.d.ts
|
.file main.d.ts
|
||||||
:marked
|
: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 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:
|
We removed the `main` set from consideration in the `exclude` section of our `tsconfig.json` file:
|
||||||
|
|
|
@ -362,7 +362,7 @@ h2#index Step 4: Add #[code index.html]
|
||||||
We loaded the following scripts
|
We loaded the following scripts
|
||||||
+makeExcerpt('index.html', 'libraries')
|
+makeExcerpt('index.html', 'libraries')
|
||||||
:marked
|
: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`.
|
Next are the polyfills for Angular2, `zone.js` and `reflect-metadata`.
|
||||||
Then the [SystemJS](#systemjs) library for module loading.
|
Then the [SystemJS](#systemjs) library for module loading.
|
||||||
|
|
||||||
|
|
|
@ -33,15 +33,10 @@ var _rxData = [
|
||||||
{
|
{
|
||||||
pattern: 'basehref',
|
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',
|
pattern: 'script',
|
||||||
from: 'node_modules/core-js/client/shim.min.js',
|
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',
|
pattern: 'script',
|
||||||
|
|
Loading…
Reference in New Issue