refactor(webworkers): move webworkers to separate @angular/platform-webworker and @angular/platform-webworker-dynamic packages

BREAKING CHANGE: web worker platform is now exported via separate packages.

Please use @angular/platform-webworker and @angular/platform-webworker-dynamic
This commit is contained in:
Igor Minar
2016-08-30 11:15:25 -07:00
committed by Victor Berchet
parent 0f68351979
commit 71ae2c4525
84 changed files with 561 additions and 305 deletions

View File

@ -0,0 +1,16 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @module
* @description
* Entry point for all public APIs of the platform-browser-dynamic package.
*/
export * from './src/platform-webworker-dynamic';
// This file only reexports content of the `src` folder. Keep it that way.

View File

@ -0,0 +1,20 @@
{
"name": "@angular/platform-webworker-dynamic",
"version": "0.0.0-PLACEHOLDER",
"description": "Angular 2 platform-webworker-dynamic",
"main": "bundles/platform-webworker-dynamic.umd.js",
"module": "index.js",
"typings": "index.d.ts",
"author": "angular",
"license": "MIT",
"peerDependencies": {
"@angular/core": "0.0.0-PLACEHOLDER",
"@angular/compiler": "0.0.0-PLACEHOLDER",
"@angular/platform-browser": "0.0.0-PLACEHOLDER",
"@angular/platform-webworker": "0.0.0-PLACEHOLDER"
},
"repository": {
"type": "git",
"url": "https://github.com/angular/angular.git"
}
}

View File

@ -0,0 +1,17 @@
export default {
entry: '../../../dist/packages-dist/platform-webworker-dynamic/index.js',
dest: '../../../dist/packages-dist/platform-webworker-dynamic/bundles/platform-webworker-dynamic.umd.js',
format: 'umd',
moduleName: 'ng.platformWebworkerDynamic',
globals: {
'@angular/core': 'ng.core',
'@angular/common': 'ng.common',
'@angular/compiler': 'ng.compiler',
'@angular/platform-browser': 'ng.platformBrowser',
'@angular/platform-webworker': 'ng.platformWebworker',
'rxjs/Subject': 'Rx',
'rxjs/observable/PromiseObservable': 'Rx', // this is wrong, but this stuff has changed in rxjs b.6 so we need to fix it when we update.
'rxjs/operator/toPromise': 'Rx.Observable.prototype',
'rxjs/Observable': 'Rx'
}
}

View File

@ -0,0 +1 @@
../../facade/src

View File

@ -0,0 +1,22 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {ResourceLoader, platformCoreDynamic} from '@angular/compiler';
import {COMPILER_OPTIONS, ClassProvider, ExistingProvider, FactoryProvider, PlatformRef, Provider, TypeProvider, ValueProvider, createPlatformFactory} from '@angular/core';
import {ResourceLoaderImpl} from './private_import_platform-browser-dynamic';
/**
* @experimental API related to bootstrapping are still under review.
*/
export const platformWorkerAppDynamic = createPlatformFactory(
platformCoreDynamic, 'workerAppDynamic', [{
provide: COMPILER_OPTIONS,
useValue: {providers: [{provide: ResourceLoader, useClass: ResourceLoaderImpl}]},
multi: true
}]);

View File

@ -0,0 +1,13 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {__core_private__ as r} from '@angular/core';
export var ReflectionCapabilities: typeof r.ReflectionCapabilities = r.ReflectionCapabilities;
export var reflector: typeof r.reflector = r.reflector;
export var Console: typeof r.Console = r.Console;

View File

@ -0,0 +1,11 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {__platform_browser_dynamic_private__ as _} from '@angular/platform-browser-dynamic';
export var ResourceLoaderImpl: typeof _.ResourceLoaderImpl = _.ResourceLoaderImpl;

View File

@ -0,0 +1,13 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {__platform_browser_private__ as _} from '@angular/platform-browser';
export var INTERNAL_BROWSER_PLATFORM_PROVIDERS: typeof _.INTERNAL_BROWSER_PLATFORM_PROVIDERS =
_.INTERNAL_BROWSER_PLATFORM_PROVIDERS;
export var getDOM: typeof _.getDOM = _.getDOM;

View File

@ -0,0 +1,29 @@
{
"compilerOptions": {
"baseUrl": ".",
"declaration": true,
"stripInternal": true,
"experimentalDecorators": true,
"module": "es2015",
"moduleResolution": "node",
"outDir": "../../../dist/packages-dist/platform-webworker-dynamic",
"paths": {
"@angular/core": ["../../../dist/packages-dist/core"],
"@angular/common": ["../../../dist/packages-dist/common"],
"@angular/compiler": ["../../../dist/packages-dist/compiler"],
"@angular/platform-browser": ["../../../dist/packages-dist/platform-browser"],
"@angular/platform-browser-dynamic": ["../../../dist/packages-dist/platform-browser-dynamic"],
"@angular/platform-webworker": ["../../../dist/packages-dist/platform-webworker"]
},
"rootDir": ".",
"sourceMap": true,
"inlineSources": true,
"target": "es5",
"skipLibCheck": true,
"lib": ["es2015", "dom"]
},
"files": [
"index.ts",
"../../../node_modules/zone.js/dist/zone.js.d.ts"
]
}