chore(build): Add WebWorker bundle.

Closes #3207

Closes #3881
This commit is contained in:
Jason Teplitz
2015-08-27 10:39:39 -07:00
parent be07390859
commit 3468f7cfd5
19 changed files with 111 additions and 1840 deletions

View File

@ -14,3 +14,4 @@ export * from './directives';
export * from './forms';
export * from './render';
export * from './profile';
export {bootstrap} from 'angular2/src/core/application';

View File

@ -6,3 +6,4 @@ export * from './directives';
export * from './forms';
export * from './render';
export * from './profile';
export {bootstrap} from 'angular2/src/core/application';

View File

@ -4,7 +4,6 @@
* Define angular core API here.
*/
export {APP_COMPONENT} from 'angular2/src/core/application_tokens';
export {commonBootstrap as bootstrap} from 'angular2/src/core/application_common';
export {Type} from 'angular2/src/core/facade/lang';
export {ApplicationRef} from 'angular2/src/core/application_ref';

View File

@ -1,5 +1,23 @@
/// <reference path="../../../globals.d.ts" />
var _global: BrowserNodeGlobal = <any>(typeof window === 'undefined' ? global : window);
// TODO(jteplitz602): Load WorkerGlobalScope from lib.webworker.d.ts file #3492
declare var WorkerGlobalScope;
var globalScope: BrowserNodeGlobal;
if (typeof window === 'undefined') {
if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) {
// TODO: Replace any with WorkerGlobalScope from lib.webworker.d.ts #3492
globalScope = <any>self;
} else {
globalScope = <any>global;
}
} else {
globalScope = <any>window;
};
// Need to declare a new variable for global here since TypeScript
// exports the original value of the symbol.
var _global: BrowserNodeGlobal = globalScope;
export {_global as global};
export var Type = Function;

View File

@ -1,5 +1,6 @@
import {EventEmitter} from 'angular2/src/core/facade/async';
import {BaseException} from 'angular2/src/core/facade/lang';
export {EventEmitter, Observable} from 'angular2/src/core/facade/async';
function _abstract() {
throw new BaseException("This method is abstract");

View File

@ -6,6 +6,7 @@ import {
import {MessageBus} from 'angular2/src/web_workers/shared/message_bus';
import {BaseException} from "angular2/src/core/facade/lang";
import {bootstrapUICommon} from "angular2/src/web_workers/ui/impl";
export * from 'angular2/src/web_workers/shared/message_bus';
/**
* Bootstrapping a WebWorker

View File

@ -10,6 +10,7 @@ import {Promise} from 'angular2/src/core/facade/async';
import {bootstrapWebWorkerCommon} from "angular2/src/web_workers/worker/application_common";
import {ApplicationRef} from "angular2/src/core/application_ref";
import {Injectable} from "angular2/di";
export * from "angular2/src/web_workers/shared/message_bus";
// TODO(jteplitz602) remove this and compile with lib.webworker.d.ts (#3492)
interface PostMessageInterface {

View File

@ -0,0 +1 @@
export * from "../src/web_workers/ui/application";

View File

@ -0,0 +1,9 @@
export * from '../metadata';
export * from '../change_detection';
export * from '../core';
export * from '../di';
export * from '../directives';
export * from '../forms';
export * from '../render';
export * from '../profile';
export * from '../src/web_workers/worker/application';

File diff suppressed because it is too large Load Diff

View File

@ -1,17 +1,4 @@
$SCRIPTS$
window = {
setTimeout: setTimeout,
Map: Map,
Set: Set,
Array: Array,
Reflect: Reflect,
RegExp: RegExp,
Promise: Promise,
Date: Date,
zone: zone
};
assert = function() {};
importScripts("b64.js");

View File

@ -1,19 +1,5 @@
$SCRIPTS$
window = {
setTimeout: setTimeout,
Map: Map,
Set: Set,
Array: Array,
Reflect: Reflect,
RegExp: RegExp,
Promise: Promise,
Date: Date,
zone: zone
};
assert = function() {};
System.config({
baseURL: '/',
defaultJSExtensions: true,

View File

@ -1,19 +1,5 @@
$SCRIPTS$
window = {
setTimeout: setTimeout,
Map: Map,
Set: Set,
Array: Array,
Reflect: Reflect,
RegExp: RegExp,
Promise: Promise,
Date: Date,
zone: zone
};
assert = function() {};
System.config({
baseURL: '/',
defaultJSExtensions: true,