chore(build): replace traceur-runtime with es6-shim.
This removes traceur as a dependency for the t push -f angular2 build. Closes #4148
This commit is contained in:
4
modules/angular1_router/build.js
vendored
4
modules/angular1_router/build.js
vendored
@ -21,8 +21,8 @@ var files = [
|
||||
var PRELUDE = '(function(){\n';
|
||||
var POSTLUDE = '\n}());\n';
|
||||
var FACADES = fs.readFileSync(__dirname + '/lib/facades.es5', 'utf8');
|
||||
var TRACEUR_RUNTIME = fs.readFileSync(__dirname + '/../../node_modules/traceur/bin/traceur-runtime.js', 'utf8');
|
||||
var DIRECTIVES = fs.readFileSync(__dirname + '/src/ng_outlet.js', 'utf8');
|
||||
var ES6_SHIM = fs.readFileSync(__dirname + '/../../node_modules/es6-shim/es6-shim.js', 'utf8');
|
||||
function main() {
|
||||
var dir = __dirname + '/../angular2/src/router/';
|
||||
|
||||
@ -85,7 +85,7 @@ function main() {
|
||||
"return router;"
|
||||
].join('\n'));
|
||||
|
||||
return PRELUDE + TRACEUR_RUNTIME + DIRECTIVES + out + POSTLUDE;
|
||||
return PRELUDE + ES6_SHIM + DIRECTIVES + out + POSTLUDE;
|
||||
}
|
||||
|
||||
|
||||
|
@ -128,7 +128,7 @@ var StringMapWrapper = {
|
||||
},
|
||||
|
||||
forEach: function (m, fn) {
|
||||
for (prop in m) {
|
||||
for (var prop in m) {
|
||||
if (m.hasOwnProperty(prop)) {
|
||||
fn(m[prop], prop);
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ To bootstrap Hello World in a WebWorker we do the following in TypeScript
|
||||
```HTML
|
||||
<html>
|
||||
<head>
|
||||
<script src="https://github.jspm.io/jmcriffey/bower-traceur-runtime@0.0.87/traceur-runtime.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/es6-shim/0.33.3/es6-shim.js"></script>
|
||||
<script src="https://jspm.io/system@0.16.js"></script>
|
||||
<script src="angular2/web_worker/ui.js"></script>
|
||||
</head>
|
||||
@ -44,7 +44,7 @@ bootstrap("loader.js");
|
||||
```
|
||||
```JavaScript
|
||||
// loader.js
|
||||
importScripts("https://github.jspm.io/jmcriffey/bower-traceur-runtime@0.0.87/traceur-runtime.js", "https://jspm.io/system@0.16.js", "angular2/web_worker/worker.js");
|
||||
importScripts("https://cdnjs.cloudflare.com/ajax/libs/es6-shim/0.33.3/es6-shim.js", "https://jspm.io/system@0.16.js", "angular2/web_worker/worker.js");
|
||||
System.import("app");
|
||||
```
|
||||
```TypeScript
|
||||
|
@ -15,7 +15,7 @@
|
||||
interface PromiseLike<T> extends Thenable<T> {}
|
||||
|
||||
// Extend the ES5 standard library with some ES6 features we polyfill at runtime
|
||||
// by loading traceur-runtime.js
|
||||
// by loading es6-shim.js
|
||||
|
||||
// These are mostly copied from lib.es6.d.ts
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Index to be used if Http is ever configured as a standalone npm package.
|
||||
// require('reflect-metadata');
|
||||
// require('traceur-runtime');
|
||||
// require('es6-shim');
|
||||
// import {HTTP_BINDINGS, JSONP_BINDINGS, Http, Jsonp} from './http';
|
||||
// import {Injector} from 'angular2/angular2';
|
||||
// export * from './http';
|
||||
|
@ -1,5 +1,5 @@
|
||||
require('reflect-metadata');
|
||||
require('traceur/bin/traceur-runtime');
|
||||
require('es6-shim');
|
||||
module.exports = require('./benchpress.js');
|
||||
// when bundling benchpress to one file, this is used
|
||||
// for getting exports out of browserify's scope.
|
||||
|
@ -10,7 +10,6 @@
|
||||
"repository": <%= JSON.stringify(packageJson.repository) %>,
|
||||
"dependencies": {
|
||||
"angular2": "<%= packageJson.version %>",
|
||||
"traceur": "<%= packageJson.dependencies.traceur %>",
|
||||
"selenium-webdriver": "<%= packageJson.dependencies['selenium-webdriver'] %>",
|
||||
"reflect-metadata": "<%= packageJson.dependencies['reflect-metadata'] %>"
|
||||
},
|
||||
|
@ -1,5 +1,5 @@
|
||||
/// <reference path="../../../angular2/typings/node/node.d.ts" />
|
||||
require('traceur/bin/traceur-runtime.js');
|
||||
require('es6-shim/es6-shim.js');
|
||||
require('reflect-metadata');
|
||||
var testHelper = require('../../src/firefox_extension/lib/test_helper.js');
|
||||
|
||||
|
Reference in New Issue
Block a user