feat(platform-browser-dynamic): re-add a deprecated platform-browser-dynamic

This commit is contained in:
Victor Berchet 2016-05-24 16:13:17 -07:00
parent f4b972815b
commit 172a5663ef
11 changed files with 133 additions and 0 deletions

View File

@ -45,6 +45,7 @@ for PACKAGE in \
compiler \
common \
platform-browser \
platform-browser-dynamic \
platform-server \
http \
router \

View File

@ -365,6 +365,7 @@ var PLATFORM_BROWSER: string[] = [
'BROWSER_APP_PROVIDERS',
'BROWSER_APP_COMPILER_PROVIDERS',
'BROWSER_PLATFORM_PROVIDERS',
'BROWSER_PROVIDERS',
'BROWSER_SANITIZATION_PROVIDERS',
'browserPlatform',
'BrowserPlatformLocation',

View File

@ -0,0 +1,12 @@
export {bootstrap, CACHED_TEMPLATE_PROVIDER} from '@angular/platform-browser';
import {BROWSER_APP_PROVIDERS, BROWSER_APP_COMPILER_PROVIDERS} from '@angular/platform-browser';
/* @deprecated the platform-browser-dynamic module is deprecated. */
export const BROWSER_APP_DYNAMIC_PROVIDERS: Array<any /*Type | Provider | any[]*/> = [
BROWSER_APP_PROVIDERS,
BROWSER_APP_COMPILER_PROVIDERS
];
console.log(`platform-browser-dynamic is deprecated, use platform-browser instead`);

View File

@ -0,0 +1,16 @@
{
"name": "@angular/platform-browser-dynamic",
"version": "$$ANGULAR_VERSION$$",
"description": "",
"main": "index.js",
"jsnext:main": "esm/index.js",
"typings": "index.d.ts",
"author": "angular",
"license": "MIT",
"peerDependencies": {
"@angular/core": "$$ANGULAR_VERSION$$",
"@angular/common": "$$ANGULAR_VERSION$$",
"@angular/compiler": "$$ANGULAR_VERSION$$",
"@angular/platform-browser": "$$ANGULAR_VERSION$$"
}
}

View File

@ -0,0 +1,19 @@
export default {
entry: '../../../dist/packages-dist/platform-browser-dynamic/esm/index.js',
dest: '../../../dist/packages-dist/platform-browser-dynamic/esm/platform-browser-dynamic.umd.js',
format: 'umd',
moduleName: 'ng.platformBrowserDynamic',
globals: {
'@angular/core': 'ng.core',
'@angular/common': 'ng.common',
'@angular/compiler': 'ng.compiler',
'@angular/platform-browser': 'ng.platformBrowser',
'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'
},
plugins: [
// nodeResolve({ jsnext: true, main: true }),
]
}

View File

@ -0,0 +1,4 @@
export * from '@angular/platform-browser/testing';
console.log(`platform-browser-dynamic/testing is deprecated, use platform-browser/testing instead`);

View File

@ -0,0 +1,3 @@
export * from '@angular/platform-browser/testing/e2e_util';
console.log(`platform-browser-dynamic/testing_e2e is deprecated, use platform-browser/testing_e2e instead`);

View File

@ -0,0 +1,35 @@
{
"angularCompilerOptions": {
"skipTemplateCodegen": true
},
"compilerOptions": {
"baseUrl": ".",
"declaration": true,
"stripInternal": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"module": "es2015",
"moduleResolution": "node",
"outDir": "../../../dist/packages-dist/platform-browser-dynamic/esm",
"paths": {
"@angular/common": ["../../../dist/packages-dist/common/"],
"@angular/compiler": ["../../../dist/packages-dist/compiler/"],
"@angular/compiler/testing": ["../../../dist/packages-dist/compiler/testing"],
"@angular/core": ["../../../dist/packages-dist/core/"],
"@angular/platform-browser": ["../../../dist/packages-dist/platform-browser"],
"@angular/platform-browser/testing": ["../../../dist/packages-dist/platform-browser/testing"]
},
"rootDir": ".",
"sourceMap": true,
"inlineSources": true,
"target": "es2015"
},
"files": [
"index.ts",
"testing.ts",
"../../../node_modules/@types/hammerjs/index.d.ts",
"../../../node_modules/@types/protractor/index.d.ts",
"../../../node_modules/@types/jasmine/index.d.ts",
"../../../node_modules/zone.js/dist/zone.js.d.ts"
]
}

View File

@ -0,0 +1,36 @@
{
"angularCompilerOptions": {
"skipTemplateCodegen": true
},
"compilerOptions": {
"baseUrl": ".",
"declaration": true,
"stripInternal": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"module": "commonjs",
"moduleResolution": "node",
"outDir": "../../../dist/packages-dist/platform-browser-dynamic/",
"paths": {
"@angular/core": ["../../../dist/packages-dist/core"],
"@angular/common": ["../../../dist/packages-dist/common"],
"@angular/compiler": ["../../../dist/packages-dist/compiler"],
"@angular/compiler/testing": ["../../../dist/packages-dist/compiler/testing"],
"@angular/platform-browser": ["../../../dist/packages-dist/platform-browser"],
"@angular/platform-browser/testing": ["../../../dist/packages-dist/platform-browser/testing"]
},
"rootDir": ".",
"sourceMap": true,
"inlineSources": true,
"lib": ["es6", "dom"],
"target": "es5"
},
"files": [
"index.ts",
"testing.ts",
"../../../node_modules/@types/hammerjs/index.d.ts",
"../../../node_modules/@types/protractor/index.d.ts",
"../../../node_modules/@types/jasmine/index.d.ts",
"../../../node_modules/zone.js/dist/zone.js.d.ts"
]
}

View File

@ -44,3 +44,8 @@ export * from './src/worker_app';
export * from './private_export';
import {BROWSER_PLATFORM_PROVIDERS} from './src/browser';
/* @deprecated use BROWSER_PLATFORM_PROVIDERS */
export const BROWSER_PROVIDERS: any[] = BROWSER_PLATFORM_PROVIDERS;

View File

@ -1225,6 +1225,7 @@ const PLATFORM_BROWSER = [
'const BROWSER_APP_COMPILER_PROVIDERS:Array<any>',
'const BROWSER_APP_PROVIDERS:Array<any>',
'const BROWSER_PLATFORM_PROVIDERS:Array<any>',
'const BROWSER_PROVIDERS:any[]',
'const BROWSER_SANITIZATION_PROVIDERS:Array<any>',
'const CACHED_TEMPLATE_PROVIDER:Array<any>',
'const DOCUMENT:OpaqueToken',