fix(packages): use ES modules for primary build (#11120)
This commit is contained in:

committed by
Victor Berchet

parent
8cb1046ce9
commit
979657989b
@ -7,9 +7,9 @@
|
||||
*/
|
||||
|
||||
|
||||
import {BrowserDomAdapter} from '../src/browser/browser_adapter';
|
||||
import {document, window} from '../src/facade/browser';
|
||||
import {NumberWrapper, isBlank} from '../src/facade/lang';
|
||||
import {document, window} from './facade/browser';
|
||||
import {NumberWrapper, isBlank} from './facade/lang';
|
||||
import {BrowserDomAdapter} from './private_import_platform-browser';
|
||||
|
||||
var DOM = new BrowserDomAdapter();
|
||||
|
||||
|
@ -5,15 +5,11 @@
|
||||
* 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 {APP_ID, ClassProvider, ExistingProvider, FactoryProvider, NgModule, NgZone, PLATFORM_INITIALIZER, PlatformRef, Provider, TypeProvider, ValueProvider, createPlatformFactory, platformCore} from '@angular/core';
|
||||
|
||||
import {BrowserModule} from '../src/browser';
|
||||
import {BrowserDomAdapter} from '../src/browser/browser_adapter';
|
||||
import {AnimationDriver} from '../src/dom/animation_driver';
|
||||
import {ELEMENT_PROBE_PROVIDERS} from '../src/dom/debug/ng_probe';
|
||||
import {AnimationDriver, BrowserModule} from '@angular/platform-browser';
|
||||
|
||||
import {BrowserDetection, createNgZone} from './browser_util';
|
||||
import {BrowserDomAdapter, ELEMENT_PROBE_PROVIDERS} from './private_import_platform-browser';
|
||||
|
||||
function initBrowserTests() {
|
||||
BrowserDomAdapter.makeCurrent();
|
||||
|
@ -7,9 +7,10 @@
|
||||
*/
|
||||
|
||||
import {NgZone} from '@angular/core';
|
||||
import {getDOM} from '../src/dom/dom_adapter';
|
||||
import {ListWrapper} from '../src/facade/collection';
|
||||
import {RegExp, StringWrapper, global, isPresent, isString} from '../src/facade/lang';
|
||||
|
||||
import {ListWrapper} from './facade/collection';
|
||||
import {RegExp, StringWrapper, global, isPresent, isString} from './facade/lang';
|
||||
import {getDOM} from './private_import_platform-browser';
|
||||
|
||||
export class BrowserDetection {
|
||||
private _overrideUa: string;
|
||||
|
1
modules/@angular/platform-browser/testing/facade
Symbolic link
1
modules/@angular/platform-browser/testing/facade
Symbolic link
@ -0,0 +1 @@
|
||||
../../facade/src
|
14
modules/@angular/platform-browser/testing/index.ts
Normal file
14
modules/@angular/platform-browser/testing/index.ts
Normal file
@ -0,0 +1,14 @@
|
||||
/**
|
||||
* @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/testing package.
|
||||
*/
|
||||
export * from './browser';
|
@ -6,9 +6,10 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {getDOM} from '../src/dom/dom_adapter';
|
||||
import {StringMapWrapper} from '../src/facade/collection';
|
||||
import {global, isString} from '../src/facade/lang';
|
||||
import {StringMapWrapper} from './facade/collection';
|
||||
import {global, isString} from './facade/lang';
|
||||
import {getDOM} from './private_import_platform-browser';
|
||||
|
||||
|
||||
/**
|
||||
* Jasmine matchers that check Angular specific conditions.
|
||||
|
@ -8,10 +8,10 @@
|
||||
|
||||
import {AnimationPlayer} from '@angular/core';
|
||||
import {MockAnimationPlayer} from '@angular/core/testing/testing_internal';
|
||||
import {AnimationDriver} from '@angular/platform-browser';
|
||||
|
||||
import {AnimationKeyframe, AnimationStyles} from '../core_private';
|
||||
import {AnimationDriver} from '../src/dom/animation_driver';
|
||||
import {StringMapWrapper} from '../src/facade/collection';
|
||||
import {StringMapWrapper} from './facade/collection';
|
||||
import {AnimationKeyframe, AnimationStyles} from './private_import_core';
|
||||
|
||||
export class MockAnimationDriver extends AnimationDriver {
|
||||
public log: {[key: string]: any}[] = [];
|
||||
@ -39,8 +39,8 @@ function _serializeKeyframes(keyframes: AnimationKeyframe[]): any[] {
|
||||
|
||||
function _serializeStyles(styles: AnimationStyles): {[key: string]: any} {
|
||||
var flatStyles: {[key: string]: any} = {};
|
||||
styles.styles.forEach(entry => StringMapWrapper.forEach(entry, (val: any, prop: string) => {
|
||||
flatStyles[prop] = val;
|
||||
}));
|
||||
styles.styles.forEach((entry: {[key: string]: string | number;}) => {
|
||||
StringMapWrapper.forEach(entry, (val: any, prop: string) => { flatStyles[prop] = val; });
|
||||
});
|
||||
return flatStyles;
|
||||
}
|
||||
|
@ -0,0 +1,33 @@
|
||||
/**
|
||||
* @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 type RenderDebugInfo = typeof r._RenderDebugInfo;
|
||||
export var RenderDebugInfo: typeof r.RenderDebugInfo = r.RenderDebugInfo;
|
||||
export var ReflectionCapabilities: typeof r.ReflectionCapabilities = r.ReflectionCapabilities;
|
||||
export var reflector: typeof r.reflector = r.reflector;
|
||||
|
||||
export type NoOpAnimationPlayer = typeof r._NoOpAnimationPlayer;
|
||||
export var NoOpAnimationPlayer: typeof r.NoOpAnimationPlayer = r.NoOpAnimationPlayer;
|
||||
export type AnimationPlayer = typeof r._AnimationPlayer;
|
||||
export var AnimationPlayer: typeof r.AnimationPlayer = r.AnimationPlayer;
|
||||
export type AnimationSequencePlayer = typeof r._AnimationSequencePlayer;
|
||||
export var AnimationSequencePlayer: typeof r.AnimationSequencePlayer = r.AnimationSequencePlayer;
|
||||
export type AnimationGroupPlayer = typeof r._AnimationGroupPlayer;
|
||||
export var AnimationGroupPlayer: typeof r.AnimationGroupPlayer = r.AnimationGroupPlayer;
|
||||
export type AnimationKeyframe = typeof r._AnimationKeyframe;
|
||||
export var AnimationKeyframe: typeof r.AnimationKeyframe = r.AnimationKeyframe;
|
||||
export type AnimationStyles = typeof r._AnimationStyles;
|
||||
export var AnimationStyles: typeof r.AnimationStyles = r.AnimationStyles;
|
||||
export var prepareFinalAnimationStyles: typeof r.prepareFinalAnimationStyles =
|
||||
r.prepareFinalAnimationStyles;
|
||||
export var balanceAnimationKeyframes: typeof r.balanceAnimationKeyframes =
|
||||
r.balanceAnimationKeyframes;
|
||||
export var clearStyles: typeof r.clearStyles = r.clearStyles;
|
||||
export var collectAndResolveStyles: typeof r.collectAndResolveStyles = r.collectAndResolveStyles;
|
@ -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 getDOM: typeof _.getDOM = _.getDOM;
|
||||
export var BrowserDomAdapter: typeof _.BrowserDomAdapter = _.BrowserDomAdapter;
|
||||
export var ELEMENT_PROBE_PROVIDERS: typeof _.ELEMENT_PROBE_PROVIDERS = _.ELEMENT_PROBE_PROVIDERS;
|
Reference in New Issue
Block a user