fix(packages): use ES modules for primary build (#11120)

This commit is contained in:
Miško Hevery
2016-08-30 18:07:40 -07:00
committed by Victor Berchet
parent 8cb1046ce9
commit 979657989b
249 changed files with 1929 additions and 1463 deletions

View File

@ -6,10 +6,8 @@
* found in the LICENSE file at https://angular.io/license
*/
import {ChangeDetectorRef, ComponentRef, DebugElement, ElementRef, NgZone, getDebugNode} from '../index';
import {scheduleMicroTask} from '../src/facade/lang';
import {tick} from './fake_async';
import {ChangeDetectorRef, ComponentRef, DebugElement, ElementRef, NgZone, getDebugNode} from '@angular/core';
import {scheduleMicroTask} from './facade/lang';
/**

View File

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

View File

@ -7,7 +7,6 @@
*/
const FakeAsyncTestZoneSpec = (Zone as any)['FakeAsyncTestZoneSpec'];
type ProxyZoneSpec = {
setDelegate(delegateSpec: ZoneSpec): void; getDelegate(): ZoneSpec; resetDelegate(): void;
@ -87,6 +86,7 @@ export function fakeAsync(fn: Function): (...args: any[]) => any {
return res;
} finally {
_inFakeAsyncCall = false;
resetFakeAsyncZone();
}
};
}

View File

@ -6,11 +6,16 @@
* found in the LICENSE file at https://angular.io/license
*/
/**
* @module
* @description
* Entry point for all public APIs of the core/testing package.
*/
export * from './async';
export * from './component_fixture';
export * from './fake_async';
export * from './test_bed';
export * from './testing';
export * from './metadata_override';
export * from '../private_export_testing';
export * from './private_export_testing';

View File

@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/
import {Injectable} from '../index';
import {Injectable} from '@angular/core';
@Injectable()
export class Log {

View File

@ -6,8 +6,8 @@
* found in the LICENSE file at https://angular.io/license
*/
import {AnimationPlayer} from '../src/animation/animation_player';
import {isPresent} from '../src/facade/lang';
import {AnimationPlayer} from '@angular/core';
import {isPresent} from './facade/lang';
export class MockAnimationPlayer implements AnimationPlayer {
private _onDoneFns: Function[] = [];

View File

@ -6,8 +6,8 @@
* found in the LICENSE file at https://angular.io/license
*/
import {Injectable, NgZone} from '../index';
import {EventEmitter} from '../src/facade/async';
import {Injectable, NgZone} from '@angular/core';
import {EventEmitter} from './facade/async';
/**
* A mock implementation of {@link NgZone}.

View File

@ -0,0 +1,23 @@
/**
* @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 * as mock_animation_player from './mock_animation_player';
import * as test_compiler from './test_compiler';
export var __core_private_testing__: {
TestingCompiler: typeof test_compiler.TestingCompiler,
_TestingCompiler?: test_compiler.TestingCompiler,
TestingCompilerFactory: typeof test_compiler.TestingCompilerFactory,
_TestingCompilerFactory?: test_compiler.TestingCompilerFactory,
MockAnimationPlayer: typeof mock_animation_player.MockAnimationPlayer
_MockAnimationPlayer?: mock_animation_player.MockAnimationPlayer
} = {
TestingCompiler: test_compiler.TestingCompiler,
TestingCompilerFactory: test_compiler.TestingCompilerFactory,
MockAnimationPlayer: mock_animation_player.MockAnimationPlayer
};

View File

@ -6,13 +6,11 @@
* found in the LICENSE file at https://angular.io/license
*/
import {CompilerOptions, ComponentMetadataType, DirectiveMetadataType, Injector, ModuleWithComponentFactories, NgModule, NgModuleFactory, NgModuleMetadataType, NgModuleRef, NgZone, OpaqueToken, PipeMetadataType, PlatformRef, Provider, SchemaMetadata} from '../index';
import {ListWrapper} from '../src/facade/collection';
import {FunctionWrapper, stringify} from '../src/facade/lang';
import {Type} from '../src/type';
import {CompilerOptions, ComponentMetadataType, DirectiveMetadataType, Injector, ModuleWithComponentFactories, NgModule, NgModuleFactory, NgModuleMetadataType, NgModuleRef, NgZone, OpaqueToken, PipeMetadataType, PlatformRef, Provider, SchemaMetadata, Type} from '@angular/core';
import {AsyncTestCompleter} from './async_test_completer';
import {ComponentFixture} from './component_fixture';
import {ListWrapper} from './facade/collection';
import {FunctionWrapper, stringify} from './facade/lang';
import {MetadataOverride} from './metadata_override';
import {TestingCompiler, TestingCompilerFactory} from './test_compiler';
@ -44,7 +42,7 @@ export var ComponentFixtureNoNgZone = new OpaqueToken('ComponentFixtureNoNgZone'
*/
export type TestModuleMetadata = {
providers?: any[]; declarations?: any[]; imports?: any[]; schemas?: Array<SchemaMetadata|any[]>;
}
};
/**
* @experimental

View File

@ -6,11 +6,12 @@
* found in the LICENSE file at https://angular.io/license
*/
import {Compiler, CompilerOptions, ComponentMetadataType, DirectiveMetadataType, Injector, NgModuleMetadataType, PipeMetadataType} from '../index';
import {unimplemented} from '../src/facade/errors';
import {Type} from '../src/type';
import {Compiler, CompilerOptions, ComponentMetadataType, DirectiveMetadataType, Injector, NgModuleMetadataType, PipeMetadataType, Type} from '@angular/core';
import {unimplemented} from './facade/errors';
import {MetadataOverride} from './metadata_override';
/**
* Special interface to the compiler only used by testing
*

View File

@ -6,15 +6,15 @@
* found in the LICENSE file at https://angular.io/license
*/
import {StringMapWrapper} from '../src/facade/collection';
import {Math, global, isPromise} from '../src/facade/lang';
import {AsyncTestCompleter} from './async_test_completer';
import {StringMapWrapper} from './facade/collection';
import {Math, global, isPromise} from './facade/lang';
import {TestBed, getTestBed, inject} from './test_bed';
export {AsyncTestCompleter} from './async_test_completer';
export {MockAnimationPlayer} from './mock_animation_player';
export {inject} from './test_bed';
export * from './logger';
export * from './ng_zone_mock';