Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions karma-js.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ module.exports = function(config) {
'node_modules/es6-module-loader/dist/es6-module-loader-sans-promises.src.js',
// Including systemjs because it defines `__eval`, which produces correct stack traces.
'node_modules/systemjs/dist/system.src.js',
'node_modules/systemjs/lib/extension-register.js',
'node_modules/systemjs/lib/extension-cjs.js',
'node_modules/rx/dist/rx.js',
'node_modules/reflect-metadata/Reflect.js',
'tools/build/file2modulename.js',
Expand Down
11 changes: 2 additions & 9 deletions modules/angular2/src/facade/async.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,8 @@ export class EventEmitter extends Observable {

constructor() {
super();

// System creates a different object for import * than Typescript es5 emit.
if (Rx.hasOwnProperty('default')) {
this._subject = new (<any>Rx).default.Rx.Subject();
this._immediateScheduler = (<any>Rx).default.Rx.Scheduler.immediate;
} else {
this._subject = new Rx.Subject<any>();
this._immediateScheduler = (<any>Rx.Scheduler).immediate;
}
this._subject = new Rx.Subject<any>();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sweet thanks

this._immediateScheduler = (<any>Rx.Scheduler).immediate;
}

observer(generator: any): Rx.IDisposable {
Expand Down
13 changes: 11 additions & 2 deletions modules/examples/src/message_broker/loader.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
$SCRIPTS$

//importScripts("math_worker.js").execute();
//System.import("examples/src/web_workers/math_worker").then(function(m){console.log("got", m)});
//importScripts("rx.js");
Expand All @@ -13,9 +14,17 @@ window = {
RegExp: RegExp,
Promise: Promise,
Date: Date
}
assert = function(){}
};
assert = function(){};


System.config({
baseURL: '/',
defaultJSExtensions: true,
paths: {
'rx': 'examples/src/message_broker/rx.js'
}
});

System.import("examples/src/message_broker/background_index").then(function(m){
console.log("running main");
Expand Down
13 changes: 12 additions & 1 deletion modules/examples/src/web_workers/images/loader.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
$SCRIPTS$ window = {
$SCRIPTS$

window = {
setTimeout: setTimeout,
Map: Map,
Set: Set,
Expand All @@ -12,6 +14,15 @@ $SCRIPTS$ window = {
assert = function() {};
importScripts("b64.js");


System.config({
baseURL: '/',
defaultJSExtensions: true,
paths: {
'rx': 'examples/src/web_workers/images/rx.js'
}
});

System.import("examples/src/web_workers/images/background_index")
.then(
function(m) {
Expand Down
13 changes: 12 additions & 1 deletion modules/examples/src/web_workers/kitchen_sink/loader.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
$SCRIPTS$ window = {
$SCRIPTS$

window = {
setTimeout: setTimeout,
Map: Map,
Set: Set,
Expand All @@ -11,6 +13,15 @@ $SCRIPTS$ window = {
};
assert = function() {};


System.config({
baseURL: '/',
defaultJSExtensions: true,
paths: {
'rx': 'examples/src/web_workers/kitchen_sink/rx.js'
}
});

System.import("examples/src/web_workers/kitchen_sink/background_index")
.then(
function(m) {
Expand Down
13 changes: 12 additions & 1 deletion modules/examples/src/web_workers/todo/loader.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
$SCRIPTS$ window = {
$SCRIPTS$

window = {
setTimeout: setTimeout,
Map: Map,
Set: Set,
Expand All @@ -11,6 +13,15 @@ $SCRIPTS$ window = {
};
assert = function() {};


System.config({
baseURL: '/',
defaultJSExtensions: true,
paths: {
'rx': 'examples/src/web_workers/todo/rx.js'
}
});

System.import("examples/src/web_workers/todo/background_index")
.then(
function(m) {
Expand Down
16 changes: 12 additions & 4 deletions npm-shrinkwrap.clean.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"angular": {
"version": "1.3.5"
},
"base64-js": {
"version": "0.0.8"
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like Jason forgot to run npm-shrinkwrap in 84463cf

// cc @jteplitz602

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry about that. In the future do I just run the shrinkwrap command whenever I modify the dependencies in package.json?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"bower": {
"version": "1.4.1",
"dependencies": {
Expand Down Expand Up @@ -1542,9 +1545,6 @@
"buffer": {
"version": "3.2.2",
"dependencies": {
"base64-js": {
"version": "0.0.8"
},
"ieee754": {
"version": "1.1.6"
},
Expand Down Expand Up @@ -9926,7 +9926,15 @@
}
},
"systemjs": {
"version": "0.9.3"
"version": "0.18.10",
"dependencies": {
"es6-module-loader": {
"version": "0.17.6"
},
"when": {
"version": "3.7.3"
}
}
},
"systemjs-builder": {
"version": "0.10.6",
Expand Down
32 changes: 22 additions & 10 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
"string": "^3.1.1",
"strip-ansi": "^2.0.1",
"symlink-or-copy": "^1.0.1",
"systemjs": "^0.9.1",
"systemjs": "^0.18.10",
"systemjs-builder": "^0.10.3",
"temp": "^0.8.1",
"ternary-stream": "^1.2.3",
Expand Down
27 changes: 11 additions & 16 deletions test-main.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,23 @@
// Tun on full stack traces in errors to help debugging
Error.stackTraceLimit=Infinity;

// Use "register" extension from systemjs.
// That's what Traceur outputs: `System.register()`.
register(System);
cjs(System);

jasmine.DEFAULT_TIMEOUT_INTERVAL = 100;

// Cancel Karma's synchronous start,
// we will call `__karma__.start()` later, once all the specs are loaded.
__karma__.loaded = function() {};

System.baseURL = '/base/';

// So that we can import packages like `core/foo`, instead of `core/src/foo`.
System.paths = {
'*': './*.js',
'benchpress/*': 'dist/js/dev/es5/benchpress/*.js',
'angular2/*': 'dist/js/dev/es5/angular2/*.js',
'http/*': 'dist/js/dev/es5/http/*.js',
'rtts_assert/*': 'dist/js/dev/es5/rtts_assert/*.js',
'rx': 'node_modules/rx/dist/rx.js'
};
System.config({
baseURL: '/base/',
defaultJSExtensions: true,
paths: {
'benchpress/*': 'dist/js/dev/es5/benchpress/*.js',
'angular2/*': 'dist/js/dev/es5/angular2/*.js',
'http/*': 'dist/js/dev/es5/http/*.js',
'rtts_assert/*': 'dist/js/dev/es5/rtts_assert/*.js',
'rx': 'node_modules/rx/dist/rx.js'
}
});

// Import all the specs, execute their `main()` method and kick off Karma (Jasmine).
System.import('angular2/src/dom/browser_adapter').then(function(browser_adapter) {
Expand Down
17 changes: 13 additions & 4 deletions tools/broccoli/html-replace/SCRIPTS.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,17 @@
<script src="traceur-runtime.js" type="text/javascript"></script>
<script src="es6-module-loader-sans-promises.src.js" type="text/javascript"></script>
<script src="system.src.js" type="text/javascript"></script>
<script src="extension-register.js" type="text/javascript"></script>
<script src="extension-cjs.js" type="text/javascript"></script>
<script src="Reflect.js" type="text/javascript"></script>
<script src="runtime_paths.js" type="text/javascript"></script>
<script type="text/javascript">System.import('@@FILENAME_NO_EXT').then(function(m) { m.main(); }, console.error.bind(console))</script>
<script type="text/javascript">
var filename = '@@FILENAME_NO_EXT';
var parent = filename.split('/');
parent = parent.splice(0, parent.length-1).join('/');
System.config({
baseURL: '/',
defaultJSExtensions: true,
paths: {
'rx': parent + '/rx.js'
}
});
System.import(filename).then(function(m) { m.main(); }, console.error.bind(console));
</script>
17 changes: 13 additions & 4 deletions tools/broccoli/html-replace/SCRIPTS_benchmarks.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,17 @@
<script src="traceur-runtime.js" type="text/javascript"></script>
<script src="es6-module-loader-sans-promises.src.js" type="text/javascript"></script>
<script src="system.src.js" type="text/javascript"></script>
<script src="extension-register.js" type="text/javascript"></script>
<script src="extension-cjs.js" type="text/javascript"></script>
<script src="Reflect.js" type="text/javascript"></script>
<script src="runtime_paths.js" type="text/javascript"></script>
<script type="text/javascript">System.import('@@FILENAME_NO_EXT').then(function(m) { m.main(); }, console.error.bind(console))</script>
<script type="text/javascript">
var filename = '@@FILENAME_NO_EXT';
var parent = filename.split('/');
parent = parent.splice(0, parent.length-1).join('/');
System.config({
baseURL: '/',
defaultJSExtensions: true,
paths: {
'rx': parent + '/rx.js'
}
});
System.import(filename).then(function(m) { m.main(); }, console.error.bind(console));
</script>
17 changes: 13 additions & 4 deletions tools/broccoli/html-replace/SCRIPTS_benchmarks_external.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,17 @@
<script src="traceur-runtime.js" type="text/javascript"></script>
<script src="es6-module-loader-sans-promises.src.js" type="text/javascript"></script>
<script src="system.src.js" type="text/javascript"></script>
<script src="extension-register.js" type="text/javascript"></script>
<script src="extension-cjs.js" type="text/javascript"></script>
<script src="Reflect.js" type="text/javascript"></script>
<script src="runtime_paths.js" type="text/javascript"></script>
<script type="text/javascript">System.import('@@FILENAME_NO_EXT').then(function(m) { m.main(); }, console.error.bind(console))</script>
<script type="text/javascript">
var filename = '@@FILENAME_NO_EXT';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not keep the System logic in in runtime_paths.js, so this file stays just a list of imports.

var parent = filename.split('/');
parent = parent.splice(0, parent.length-1).join('/');
System.config({
baseURL: '/',
defaultJSExtensions: true,
paths: {
'rx': parent + '/rx.js'
}
});
System.import(filename).then(function(m) { m.main(); }, console.error.bind(console));
</script>
Binary file removed tools/broccoli/js-replace/.SCRIPTS.js.swp
Binary file not shown.
3 changes: 1 addition & 2 deletions tools/broccoli/js-replace/SCRIPTS.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
importScripts("/examples/src/assets/zone-microtask-web-workers.js", "long-stack-trace-zone.js",
"traceur-runtime.js", "es6-module-loader-sans-promises.src.js", "system.src.js",
"extension-register.js", "extension-cjs.js", "Reflect.js", "runtime_paths.js");
"traceur-runtime.js", "es6-module-loader-sans-promises.src.js", "system.src.js", "Reflect.js");
3 changes: 0 additions & 3 deletions tools/broccoli/trees/browser_tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,9 @@ module.exports = function makeBrowserTree(options, destinationPath) {
'node_modules/zone.js/dist/long-stack-trace-zone.js',
'node_modules/es6-module-loader/dist/es6-module-loader-sans-promises.src.js',
'node_modules/systemjs/dist/system.src.js',
'node_modules/systemjs/lib/extension-register.js',
'node_modules/systemjs/lib/extension-cjs.js',
'node_modules/rx/dist/rx.js',
'node_modules/base64-js/lib/b64.js',
'node_modules/reflect-metadata/Reflect.js',
'tools/build/snippets/runtime_paths.js',
path.relative(projectRootDir, TRACEUR_RUNTIME_PATH)
]
}));
Expand Down
7 changes: 0 additions & 7 deletions tools/build/snippets/runtime_paths.js

This file was deleted.