chore(core): move compiler out of core

BREAKING CHANGE

All imports from 'angular2/core/compiler' should be changed to 'angular2/compiler'.
This commit is contained in:
vsavkin 2015-11-05 14:07:57 -08:00
parent f39bbff7bc
commit 6edd964a83
121 changed files with 217 additions and 234 deletions

View File

@ -0,0 +1,7 @@
/**
* @module
* @description
* Starting point to import all compiler APIs.
*/
export * from './src/compiler/url_resolver';
export * from './src/compiler/xhr';

View File

@ -19,4 +19,4 @@ export * from './src/core/directives';
export * from './src/core/forms';
export * from './src/core/debug';
export * from './src/core/change_detection';
export * from './src/core/compiler/ambient';
export * from './src/core/ambient';

View File

@ -2,4 +2,4 @@ export * from './src/mock/mock_location_strategy';
export {LocationStrategy} from './src/router/location_strategy';
export {MockViewResolver} from 'angular2/src/mock/view_resolver_mock';
export {MockXHR} from 'angular2/src/core/compiler/xhr_mock';
export {MockXHR} from 'angular2/src/compiler/xhr_mock';

View File

@ -1,4 +1,4 @@
import {AppRootUrl} from "angular2/src/core/compiler/app_root_url";
import {AppRootUrl} from "angular2/src/compiler/app_root_url";
import {DOM} from "angular2/src/core/dom/dom_adapter";
import {Injectable} from "angular2/src/core/di";

View File

@ -5,7 +5,7 @@ import {
} from 'angular2/src/core/change_detection/change_detection_jit_generator';
import {createChangeDetectorDefinitions} from './change_definition_factory';
import {isJsObject, CONST_EXPR} from 'angular2/src/core/facade/lang';
import {IS_DART, isJsObject, CONST_EXPR} from 'angular2/src/core/facade/lang';
import {
ChangeDetectorGenConfig,
@ -16,7 +16,7 @@ import {
import {TemplateAst} from './template_ast';
import {Codegen} from 'angular2/src/transform/template_compiler/change_detector_codegen';
import {IS_DART, MODULE_SUFFIX} from './util';
import {MODULE_SUFFIX} from './util';
import {Injectable} from 'angular2/src/core/di';
const ABSTRACT_CHANGE_DETECTOR = "AbstractChangeDetector";

View File

@ -6,28 +6,26 @@ export {
CompileTemplateMetadata
} from './directive_metadata';
export {SourceModule, SourceWithImports} from './source_module';
export {AMBIENT_DIRECTIVES, AMBIENT_PIPES} from './ambient';
export {AMBIENT_DIRECTIVES, AMBIENT_PIPES} from 'angular2/src/core/ambient';
import {assertionsEnabled, Type} from 'angular2/src/core/facade/lang';
import {provide, Provider} from 'angular2/src/core/di';
import {TemplateParser} from 'angular2/src/core/compiler/template_parser';
import {HtmlParser} from 'angular2/src/core/compiler/html_parser';
import {TemplateNormalizer} from 'angular2/src/core/compiler/template_normalizer';
import {RuntimeMetadataResolver} from 'angular2/src/core/compiler/runtime_metadata';
import {ChangeDetectionCompiler} from 'angular2/src/core/compiler/change_detector_compiler';
import {StyleCompiler} from 'angular2/src/core/compiler/style_compiler';
import {CommandCompiler} from 'angular2/src/core/compiler/command_compiler';
import {TemplateCompiler} from 'angular2/src/core/compiler/template_compiler';
import {TemplateParser} from 'angular2/src/compiler/template_parser';
import {HtmlParser} from 'angular2/src/compiler/html_parser';
import {TemplateNormalizer} from 'angular2/src/compiler/template_normalizer';
import {RuntimeMetadataResolver} from 'angular2/src/compiler/runtime_metadata';
import {ChangeDetectionCompiler} from 'angular2/src/compiler/change_detector_compiler';
import {StyleCompiler} from 'angular2/src/compiler/style_compiler';
import {CommandCompiler} from 'angular2/src/compiler/command_compiler';
import {TemplateCompiler} from 'angular2/src/compiler/template_compiler';
import {ChangeDetectorGenConfig} from 'angular2/src/core/change_detection/change_detection';
import {Compiler} from 'angular2/src/core/linker/compiler';
import {RuntimeCompiler} from 'angular2/src/core/compiler/runtime_compiler';
import {ElementSchemaRegistry} from 'angular2/src/core/compiler/schema/element_schema_registry';
import {
DomElementSchemaRegistry
} from 'angular2/src/core/compiler/schema/dom_element_schema_registry';
import {UrlResolver} from 'angular2/src/core/compiler/url_resolver';
import {AppRootUrl} from 'angular2/src/core/compiler/app_root_url';
import {AnchorBasedAppRootUrl} from 'angular2/src/core/compiler/anchor_based_app_root_url';
import {RuntimeCompiler} from 'angular2/src/compiler/runtime_compiler';
import {ElementSchemaRegistry} from 'angular2/src/compiler/schema/element_schema_registry';
import {DomElementSchemaRegistry} from 'angular2/src/compiler/schema/dom_element_schema_registry';
import {UrlResolver} from 'angular2/src/compiler/url_resolver';
import {AppRootUrl} from 'angular2/src/compiler/app_root_url';
import {AnchorBasedAppRootUrl} from 'angular2/src/compiler/anchor_based_app_root_url';
import {Parser, Lexer} from 'angular2/src/core/change_detection/change_detection';
export function compilerProviders(): Array<Type | Provider | any[]> {

View File

@ -13,7 +13,7 @@ import {
CHANGE_DETECTION_STRATEGY_VALUES
} from 'angular2/src/core/change_detection/change_detection';
import {ViewEncapsulation, VIEW_ENCAPSULATION_VALUES} from 'angular2/src/core/metadata/view';
import {CssSelector} from 'angular2/src/core/compiler/selector';
import {CssSelector} from 'angular2/src/compiler/selector';
import {splitAtColon} from './util';
import {LifecycleHooks, LIFECYCLE_HOOKS_VALUES} from 'angular2/src/core/linker/interfaces';

View File

@ -18,7 +18,7 @@ import {hasLifecycleHook} from 'angular2/src/core/linker/directive_lifecycle_ref
import {LifecycleHooks, LIFECYCLE_HOOKS_VALUES} from 'angular2/src/core/linker/interfaces';
import {reflector} from 'angular2/src/core/reflection/reflection';
import {Injectable, Inject, Optional} from 'angular2/src/core/di';
import {AMBIENT_DIRECTIVES} from 'angular2/src/core/compiler/ambient';
import {AMBIENT_DIRECTIVES} from 'angular2/src/core/ambient';
import {MODULE_SUFFIX} from './util';
@Injectable()

View File

@ -1,15 +1,14 @@
import {CompileTypeMetadata, CompileTemplateMetadata} from './directive_metadata';
import {SourceModule, SourceExpression, moduleRef} from './source_module';
import {ViewEncapsulation} from 'angular2/src/core/metadata/view';
import {XHR} from 'angular2/src/core/compiler/xhr';
import {StringWrapper, isBlank} from 'angular2/src/core/facade/lang';
import {XHR} from 'angular2/src/compiler/xhr';
import {IS_DART, StringWrapper, isBlank} from 'angular2/src/core/facade/lang';
import {PromiseWrapper, Promise} from 'angular2/src/core/facade/async';
import {ShadowCss} from 'angular2/src/core/compiler/shadow_css';
import {UrlResolver} from 'angular2/src/core/compiler/url_resolver';
import {ShadowCss} from 'angular2/src/compiler/shadow_css';
import {UrlResolver} from 'angular2/src/compiler/url_resolver';
import {extractStyleUrls} from './style_url_resolver';
import {
escapeSingleQuoteString,
IS_DART,
codeGenConcatArray,
codeGenMapArray,
codeGenReplaceAll,

View File

@ -8,7 +8,7 @@ import {
isPresent,
isBlank
} from 'angular2/src/core/facade/lang';
import {UrlResolver} from 'angular2/src/core/compiler/url_resolver';
import {UrlResolver} from 'angular2/src/compiler/url_resolver';
export class StyleWithImports {
constructor(public style: string, public styleUrls: string[]) {}

View File

@ -1,4 +1,4 @@
import {Type, Json, isBlank, stringify} from 'angular2/src/core/facade/lang';
import {IS_DART, Type, Json, isBlank, stringify} from 'angular2/src/core/facade/lang';
import {BaseException} from 'angular2/src/core/facade/exceptions';
import {ListWrapper, SetWrapper} from 'angular2/src/core/facade/collection';
import {PromiseWrapper, Promise} from 'angular2/src/core/facade/async';
@ -27,7 +27,6 @@ import {APP_ID} from 'angular2/src/core/application_tokens';
import {TEMPLATE_COMMANDS_MODULE_REF} from './command_compiler';
import {
IS_DART,
codeGenExportVariable,
escapeSingleQuoteString,
codeGenValueFn,

View File

@ -8,8 +8,8 @@ import {ListWrapper} from 'angular2/src/core/facade/collection';
import {BaseException} from 'angular2/src/core/facade/exceptions';
import {Promise, PromiseWrapper} from 'angular2/src/core/facade/async';
import {XHR} from 'angular2/src/core/compiler/xhr';
import {UrlResolver} from 'angular2/src/core/compiler/url_resolver';
import {XHR} from 'angular2/src/compiler/xhr';
import {UrlResolver} from 'angular2/src/compiler/url_resolver';
import {extractStyleUrls, isStyleUrlResolvable} from './style_url_resolver';
import {Injectable} from 'angular2/src/core/di';
import {ViewEncapsulation} from 'angular2/src/core/metadata/view';

View File

@ -35,9 +35,9 @@ import {
DirectiveAst,
BoundDirectivePropertyAst
} from './template_ast';
import {CssSelector, SelectorMatcher} from 'angular2/src/core/compiler/selector';
import {CssSelector, SelectorMatcher} from 'angular2/src/compiler/selector';
import {ElementSchemaRegistry} from 'angular2/src/core/compiler/schema/element_schema_registry';
import {ElementSchemaRegistry} from 'angular2/src/compiler/schema/element_schema_registry';
import {preparseElement, PreparsedElement, PreparsedElementType} from './template_preparser';
import {isStyleUrlResolvable} from './style_url_resolver';

View File

@ -1,12 +1,10 @@
import {StringWrapper, isBlank, isJsObject} from 'angular2/src/core/facade/lang';
import {IS_DART, StringWrapper, isBlank} from 'angular2/src/core/facade/lang';
var CAMEL_CASE_REGEXP = /([A-Z])/g;
var DASH_CASE_REGEXP = /-([a-z])/g;
var SINGLE_QUOTE_ESCAPE_STRING_RE = /'|\\|\n|\$/g;
var DOUBLE_QUOTE_ESCAPE_STRING_RE = /"|\\|\n|\$/g;
export var IS_DART = !isJsObject({});
export var MODULE_SUFFIX = IS_DART ? '.dart' : '.js';
export function camelCaseToDashCase(input: string): string {

View File

@ -1,5 +1,6 @@
import {Promise} from 'angular2/src/core/facade/async';
// TODO: vsavkin rename it into TemplateLoader and do not reexport it via DomAdapter
export class XHR {
get(url: string): Promise<string> { return null; }
}

View File

@ -1,4 +1,4 @@
import {XHR} from 'angular2/src/core/compiler/xhr';
import {XHR} from 'angular2/src/compiler/xhr';
import {ListWrapper, Map, MapWrapper} from 'angular2/src/core/facade/collection';
import {isBlank, isPresent, normalizeBlank} from 'angular2/src/core/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';

View File

@ -7,7 +7,7 @@ import 'package:angular2/src/core/reflection/reflection_capabilities.dart'
show ReflectionCapabilities;
import 'application_common.dart';
import 'package:angular2/src/core/compiler/compiler.dart';
import 'package:angular2/src/compiler/compiler.dart';
import 'package:angular2/src/core/linker/dynamic_component_loader.dart';
export 'package:angular2/src/core/linker/dynamic_component_loader.dart'
show ComponentRef;

View File

@ -2,7 +2,7 @@
import {Provider} from './di';
import {Type, isPresent} from 'angular2/src/core/facade/lang';
import {Promise} from 'angular2/src/core/facade/async';
import {compilerProviders} from 'angular2/src/core/compiler/compiler';
import {compilerProviders} from 'angular2/src/compiler/compiler';
import {commonBootstrap} from './application_common';
import {ComponentRef} from './linker/dynamic_component_loader';

View File

@ -5,8 +5,8 @@ import {BrowserDomAdapter} from 'angular2/src/core/dom/browser_adapter';
import {BrowserGetTestability} from 'angular2/src/core/testability/browser_testability';
import {DOM} from 'angular2/src/core/dom/dom_adapter';
import {Promise} from 'angular2/src/core/facade/async';
import {XHR} from 'angular2/src/core/compiler/xhr';
import {XHRImpl} from 'angular2/src/core/compiler/xhr_impl';
import {XHR} from 'angular2/src/compiler/xhr';
import {XHRImpl} from 'angular2/src/compiler/xhr_impl';
import {
EventManager,

View File

@ -47,7 +47,7 @@ import {AppViewManager_} from "./linker/view_manager";
import {Compiler_} from "./linker/compiler";
import {wtfLeave, wtfCreateScope, WtfScopeFn} from './profile/profile';
import {ChangeDetectorRef} from 'angular2/src/core/change_detection/change_detector_ref';
import {AMBIENT_DIRECTIVES, AMBIENT_PIPES} from "angular2/src/core/compiler/ambient";
import {AMBIENT_DIRECTIVES, AMBIENT_PIPES} from "angular2/src/core/ambient";
import {COMMON_DIRECTIVES, COMMON_PIPES} from "angular2/common";
/**

View File

@ -1,4 +1,4 @@
import {Json, StringWrapper, isPresent, isBlank} from 'angular2/src/core/facade/lang';
import {IS_DART, Json, StringWrapper, isPresent, isBlank} from 'angular2/src/core/facade/lang';
import {CodegenNameUtil} from './codegen_name_util';
import {codify, combineGeneratedStrings, rawString} from './codegen_facade';
import {ProtoRecord, RecordType} from './proto_record';
@ -6,7 +6,6 @@ import {BindingTarget} from './binding_record';
import {DirectiveRecord} from './directive_record';
import {ChangeDetectionStrategy} from './constants';
import {BaseException} from 'angular2/src/core/facade/exceptions';
import {IS_DART} from 'angular2/src/core/compiler/util';
/**
* Class responsible for providing change detection logic for change detector classes.

View File

@ -4,7 +4,7 @@ import 'package:html/parser.dart' as parser;
import 'package:html/dom.dart';
import 'dom_adapter.dart';
import '../compiler/xhr.dart';
import 'package:angular2/src/compiler/xhr.dart';
const _attrToPropMap = const {
'innerHtml': 'innerHTML',

View File

@ -1,7 +1,7 @@
import {ListWrapper, StringMapWrapper} from 'angular2/src/core/facade/collection';
import {isPresent, isFunction, StringWrapper, Type} from 'angular2/src/core/facade/lang';
import {DomAdapter} from './dom_adapter';
import {XHRImpl} from 'angular2/src/core/compiler/xhr_impl';
import {XHRImpl} from 'angular2/src/compiler/xhr_impl';
/**

View File

@ -14,8 +14,8 @@ import {
DateWrapper
} from 'angular2/src/core/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
import {SelectorMatcher, CssSelector} from 'angular2/src/core/compiler/selector';
import {XHR} from 'angular2/src/core/compiler/xhr';
import {SelectorMatcher, CssSelector} from 'angular2/src/compiler/selector';
import {XHR} from 'angular2/src/compiler/xhr';
var _attrToPropMap: {[key: string]: string} = {
'class': 'className',

View File

@ -17,6 +17,8 @@ class CONST {
const CONST();
}
const IS_DART = true;
bool isPresent(obj) => obj != null;
bool isBlank(obj) => obj == null;
bool isString(obj) => obj is String;

View File

@ -12,6 +12,8 @@ if (typeof window === 'undefined') {
globalScope = <any>window;
};
export const IS_DART = false;
// Need to declare a new variable for global here since TypeScript
// exports the original value of the symbol.
var _global: BrowserNodeGlobal = globalScope;

View File

@ -14,7 +14,7 @@ import {DirectiveResolver} from './directive_resolver';
import {ViewResolver} from './view_resolver';
import {PipeResolver} from './pipe_resolver';
import {ViewMetadata} from '../metadata/view';
import {AMBIENT_PIPES} from 'angular2/src/core/compiler/ambient';
import {AMBIENT_PIPES} from 'angular2/src/core/ambient';
import {
visitAllCommands,

View File

@ -1,4 +1,4 @@
// Public API for Services
export {AppRootUrl} from 'angular2/src/core/compiler/app_root_url';
export {UrlResolver} from 'angular2/src/core/compiler/url_resolver';
export {AppRootUrl} from 'angular2/src/compiler/app_root_url';
export {UrlResolver} from 'angular2/src/compiler/url_resolver';
export {Title} from 'angular2/src/core/services/title';

View File

@ -16,7 +16,7 @@ import {ViewResolver} from 'angular2/src/core/linker/view_resolver';
import {DirectiveResolver} from 'angular2/src/core/linker/directive_resolver';
import {PipeResolver} from 'angular2/src/core/linker/pipe_resolver';
import {DynamicComponentLoader} from 'angular2/src/core/linker/dynamic_component_loader';
import {XHR} from 'angular2/src/core/compiler/xhr';
import {XHR} from 'angular2/src/compiler/xhr';
import {NgZone} from 'angular2/src/core/zone/ng_zone';
import {DOM} from 'angular2/src/core/dom/dom_adapter';
@ -54,7 +54,7 @@ import {
import {APP_ID} from 'angular2/src/core/application_tokens';
import {Serializer} from "angular2/src/web_workers/shared/serializer";
import {Log} from './utils';
import {compilerProviders} from 'angular2/src/core/compiler/compiler';
import {compilerProviders} from 'angular2/src/compiler/compiler';
import {DomRenderer_} from "angular2/src/core/render/dom/dom_renderer";
import {DynamicComponentLoader_} from "angular2/src/core/linker/dynamic_component_loader";
import {AppViewManager_} from "angular2/src/core/linker/view_manager";

View File

@ -4,7 +4,7 @@ import {
// Note: This class is only here so that we can reference it from TypeScript code.
// The actual implementation lives under modules_dart.
// TODO(tbosch): Move the corresponding code into angular2/src/core/compiler once
// TODO(tbosch): Move the corresponding code into angular2/src/compiler once
// the new compiler is done.
export class Codegen {
constructor(moduleAlias: string) {}

View File

@ -15,7 +15,7 @@ import {
} from 'angular2/angular2';
import {applicationDomProviders} from 'angular2/src/core/application_common';
import {applicationCommonProviders} from 'angular2/src/core/application_ref';
import {compilerProviders} from 'angular2/src/core/compiler/compiler';
import {compilerProviders} from 'angular2/src/compiler/compiler';
import {ObservableWrapper} from 'angular2/src/core/facade/async';
import {getComponentInfo, ComponentInfo} from './metadata';

View File

@ -16,13 +16,11 @@ import {KeyEventsPlugin} from 'angular2/src/core/render/dom/events/key_events';
import {HammerGesturesPlugin} from 'angular2/src/core/render/dom/events/hammer_gestures';
import {AppViewPool, APP_VIEW_POOL_CAPACITY} from 'angular2/src/core/linker/view_pool';
import {Renderer} from 'angular2/src/core/render/api';
import {AppRootUrl} from 'angular2/src/core/compiler/app_root_url';
import {AppRootUrl} from 'angular2/src/compiler/app_root_url';
import {DomRenderer, DomRenderer_, DOCUMENT} from 'angular2/src/core/render/render';
import {APP_ID_RANDOM_PROVIDER} from 'angular2/src/core/application_tokens';
import {ElementSchemaRegistry} from 'angular2/src/core/compiler/schema/element_schema_registry';
import {
DomElementSchemaRegistry
} from 'angular2/src/core/compiler/schema/dom_element_schema_registry';
import {ElementSchemaRegistry} from 'angular2/src/compiler/schema/element_schema_registry';
import {DomElementSchemaRegistry} from 'angular2/src/compiler/schema/dom_element_schema_registry';
import {
SharedStylesHost,
DomSharedStylesHost
@ -39,17 +37,17 @@ import {
DynamicComponentLoader,
DynamicComponentLoader_
} from 'angular2/src/core/linker/dynamic_component_loader';
import {UrlResolver} from 'angular2/src/core/compiler/url_resolver';
import {UrlResolver} from 'angular2/src/compiler/url_resolver';
import {Testability} from 'angular2/src/core/testability/testability';
import {XHR} from 'angular2/src/core/compiler/xhr';
import {XHRImpl} from 'angular2/src/core/compiler/xhr_impl';
import {XHR} from 'angular2/src/compiler/xhr';
import {XHRImpl} from 'angular2/src/compiler/xhr_impl';
import {Serializer} from 'angular2/src/web_workers/shared/serializer';
import {ON_WEB_WORKER} from 'angular2/src/web_workers/shared/api';
import {RenderProtoViewRefStore} from 'angular2/src/web_workers/shared/render_proto_view_ref_store';
import {
RenderViewWithFragmentsStore
} from 'angular2/src/web_workers/shared/render_view_with_fragments_store';
import {AnchorBasedAppRootUrl} from 'angular2/src/core/compiler/anchor_based_app_root_url';
import {AnchorBasedAppRootUrl} from 'angular2/src/compiler/anchor_based_app_root_url';
import {WebWorkerApplication} from 'angular2/src/web_workers/ui/impl';
import {MessageBus} from 'angular2/src/web_workers/shared/message_bus';
import {MessageBasedRenderer} from 'angular2/src/web_workers/ui/renderer';
@ -63,7 +61,7 @@ import {
ClientMessageBrokerFactory,
ClientMessageBrokerFactory_
} from 'angular2/src/web_workers/shared/client_message_broker';
import {AMBIENT_DIRECTIVES, AMBIENT_PIPES} from "angular2/src/core/compiler/ambient";
import {AMBIENT_DIRECTIVES, AMBIENT_PIPES} from "angular2/src/core/ambient";
import {COMMON_DIRECTIVES, COMMON_PIPES} from "angular2/common";
var _rootInjector: Injector;

View File

@ -1,7 +1,7 @@
import {SETUP_CHANNEL} from 'angular2/src/web_workers/shared/messaging_api';
import {EventEmitter, ObservableWrapper} from 'angular2/src/core/facade/async';
import {MessageBus} from 'angular2/src/web_workers/shared/message_bus';
import {AnchorBasedAppRootUrl} from 'angular2/src/core/compiler/anchor_based_app_root_url';
import {AnchorBasedAppRootUrl} from 'angular2/src/compiler/anchor_based_app_root_url';
import {StringWrapper} from 'angular2/src/core/facade/lang';
import {Injectable} from 'angular2/src/core/di';

View File

@ -1,7 +1,7 @@
import {Injectable} from 'angular2/src/core/di';
import {PRIMITIVE} from 'angular2/src/web_workers/shared/serializer';
import {XHR_CHANNEL} from 'angular2/src/web_workers/shared/messaging_api';
import {XHR} from 'angular2/src/core/compiler/xhr';
import {XHR} from 'angular2/src/compiler/xhr';
import {ServiceMessageBrokerFactory} from 'angular2/src/web_workers/shared/service_message_broker';
import {bind} from './bind';

View File

@ -11,9 +11,9 @@ import {
} from 'angular2/src/core/facade/lang';
import {ExceptionHandler} from 'angular2/src/core/facade/exceptions';
import {Promise, PromiseWrapper, PromiseCompleter} from 'angular2/src/core/facade/async';
import {XHR} from 'angular2/src/core/compiler/xhr';
import {XHR} from 'angular2/src/compiler/xhr';
import {WebWorkerXHRImpl} from 'angular2/src/web_workers/worker/xhr_impl';
import {AppRootUrl} from 'angular2/src/core/compiler/app_root_url';
import {AppRootUrl} from 'angular2/src/compiler/app_root_url';
import {WebWorkerRenderer} from './renderer';
import {Renderer} from 'angular2/src/core/render/api';
import {
@ -42,7 +42,7 @@ import {SETUP_CHANNEL} from 'angular2/src/web_workers/shared/messaging_api';
import {WebWorkerEventDispatcher} from 'angular2/src/web_workers/worker/event_dispatcher';
import {ComponentRef} from 'angular2/src/core/linker/dynamic_component_loader';
import {NgZone} from 'angular2/src/core/zone/ng_zone';
import {compilerProviders} from 'angular2/src/core/compiler/compiler';
import {compilerProviders} from 'angular2/src/compiler/compiler';
/**
* Initialize the Angular 'platform' on the page in a manner suitable for applications

View File

@ -1,6 +1,6 @@
import {Injectable} from 'angular2/src/core/di';
import {Promise} from 'angular2/src/core/facade/async';
import {XHR} from 'angular2/src/core/compiler/xhr';
import {XHR} from 'angular2/src/compiler/xhr';
import {
FnArg,
UiArguments,

View File

@ -16,8 +16,8 @@ import {MapWrapper} from 'angular2/src/core/facade/collection';
import {
CompileDirectiveMetadata,
CompileTypeMetadata
} from 'angular2/src/core/compiler/directive_metadata';
import {TemplateParser} from 'angular2/src/core/compiler/template_parser';
} from 'angular2/src/compiler/directive_metadata';
import {TemplateParser} from 'angular2/src/compiler/template_parser';
import {
Parser,
Lexer,
@ -32,9 +32,7 @@ import {
ChangeDetector
} from 'angular2/src/core/change_detection/change_detection';
import {Pipes} from 'angular2/src/core/change_detection/pipes';
import {
createChangeDetectorDefinitions
} from 'angular2/src/core/compiler/change_definition_factory';
import {createChangeDetectorDefinitions} from 'angular2/src/compiler/change_definition_factory';
import {TestDirective, TestDispatcher, TestPipes} from './change_detector_mocks';
import {TEST_PROVIDERS} from './test_bindings';

View File

@ -18,20 +18,20 @@ import {CONST_EXPR, stringify} from 'angular2/src/core/facade/lang';
import {MapWrapper} from 'angular2/src/core/facade/collection';
import {Promise} from 'angular2/src/core/facade/async';
import {ChangeDetectionCompiler} from 'angular2/src/core/compiler/change_detector_compiler';
import {ChangeDetectionCompiler} from 'angular2/src/compiler/change_detector_compiler';
import {
CompileDirectiveMetadata,
CompileTypeMetadata
} from 'angular2/src/core/compiler/directive_metadata';
} from 'angular2/src/compiler/directive_metadata';
import {
SourceModule,
SourceExpression,
SourceExpressions,
moduleRef
} from 'angular2/src/core/compiler/source_module';
} from 'angular2/src/compiler/source_module';
import {TemplateParser} from 'angular2/src/core/compiler/template_parser';
import {TemplateParser} from 'angular2/src/compiler/template_parser';
import {
ChangeDetectorGenConfig,
@ -47,14 +47,10 @@ import {evalModule} from './eval_module';
import {TEST_PROVIDERS} from './test_bindings';
import {TestDispatcher, TestPipes} from './change_detector_mocks';
import {
codeGenValueFn,
codeGenExportVariable,
MODULE_SUFFIX
} from 'angular2/src/core/compiler/util';
import {codeGenValueFn, codeGenExportVariable, MODULE_SUFFIX} from 'angular2/src/compiler/util';
// Attention: These module names have to correspond to real modules!
var THIS_MODULE_ID = 'angular2/test/core/compiler/change_detector_compiler_spec';
var THIS_MODULE_ID = 'angular2/test/compiler/change_detector_compiler_spec';
var THIS_MODULE_URL = `package:${THIS_MODULE_ID}${MODULE_SUFFIX}`;
var THIS_MODULE_REF = moduleRef(THIS_MODULE_URL);

View File

@ -16,7 +16,7 @@ import {
import {CONST_EXPR, stringify, isType, Type, isBlank} from 'angular2/src/core/facade/lang';
import {MapWrapper} from 'angular2/src/core/facade/collection';
import {PromiseWrapper, Promise} from 'angular2/src/core/facade/async';
import {TemplateParser} from 'angular2/src/core/compiler/template_parser';
import {TemplateParser} from 'angular2/src/compiler/template_parser';
import {
CommandVisitor,
TextCmd,
@ -28,13 +28,13 @@ import {
visitAllCommands,
CompiledTemplate
} from 'angular2/src/core/linker/template_commands';
import {CommandCompiler} from 'angular2/src/core/compiler/command_compiler';
import {CommandCompiler} from 'angular2/src/compiler/command_compiler';
import {
CompileDirectiveMetadata,
CompileTypeMetadata,
CompileTemplateMetadata
} from 'angular2/src/core/compiler/directive_metadata';
import {SourceModule, SourceExpression, moduleRef} from 'angular2/src/core/compiler/source_module';
} from 'angular2/src/compiler/directive_metadata';
import {SourceModule, SourceExpression, moduleRef} from 'angular2/src/compiler/source_module';
import {ViewEncapsulation} from 'angular2/src/core/metadata/view';
import {evalModule} from './eval_module';
import {
@ -42,7 +42,7 @@ import {
codeGenValueFn,
codeGenExportVariable,
MODULE_SUFFIX
} from 'angular2/src/core/compiler/util';
} from 'angular2/src/compiler/util';
import {TEST_PROVIDERS} from './test_bindings';
const BEGIN_ELEMENT = 'BEGIN_ELEMENT';
@ -54,7 +54,7 @@ const NG_CONTENT = 'NG_CONTENT';
const EMBEDDED_TEMPLATE = 'EMBEDDED_TEMPLATE';
// Attention: These module names have to correspond to real modules!
var THIS_MODULE_URL = `package:angular2/test/core/compiler/command_compiler_spec${MODULE_SUFFIX}`;
var THIS_MODULE_URL = `package:angular2/test/compiler/command_compiler_spec${MODULE_SUFFIX}`;
var THIS_MODULE_REF = moduleRef(THIS_MODULE_URL);
var TEMPLATE_COMMANDS_MODULE_REF =
moduleRef(`package:angular2/src/core/linker/template_commands${MODULE_SUFFIX}`);

View File

@ -16,7 +16,7 @@ import {
CompileDirectiveMetadata,
CompileTypeMetadata,
CompileTemplateMetadata
} from 'angular2/src/core/compiler/directive_metadata';
} from 'angular2/src/compiler/directive_metadata';
import {ViewEncapsulation} from 'angular2/src/core/metadata/view';
import {ChangeDetectionStrategy} from 'angular2/src/core/change_detection';
import {LifecycleHooks} from 'angular2/src/core/linker/interfaces';

View File

@ -11,7 +11,7 @@ import {
AsyncTestCompleter,
inject
} from 'angular2/testing_internal';
import {IS_DART} from '../../platform';
import {IS_DART} from 'angular2/src/core/facade/lang';
import {evalModule} from './eval_module';
@ -19,8 +19,7 @@ import {evalModule} from './eval_module';
// when evaling the test module!
export var TEST_VALUE = 23;
const THIS_MODULE_URL =
`package:angular2/test/core/compiler/eval_module_spec${IS_DART?'.dart':'.js'}`;
const THIS_MODULE_URL = `package:angular2/test/compiler/eval_module_spec${IS_DART?'.dart':'.js'}`;
export function main() {
describe('evalModule', () => {

View File

@ -9,7 +9,7 @@ import {
afterEach
} from 'angular2/testing_internal';
import {HtmlParser} from 'angular2/src/core/compiler/html_parser';
import {HtmlParser} from 'angular2/src/compiler/html_parser';
import {
HtmlAst,
HtmlAstVisitor,
@ -17,7 +17,7 @@ import {
HtmlAttrAst,
HtmlTextAst,
htmlVisitAll
} from 'angular2/src/core/compiler/html_ast';
} from 'angular2/src/compiler/html_ast';
export function main() {
describe('DomParser', () => {

View File

@ -15,13 +15,13 @@ import {
import {Component, View, provide} from 'angular2/core';
import {PromiseWrapper} from 'angular2/src/core/facade/async';
import {SpyProtoViewFactory} from '../spies';
import {SpyProtoViewFactory} from '../core/spies';
import {
CompiledHostTemplate,
CompiledTemplate,
BeginComponentCmd
} from 'angular2/src/core/linker/template_commands';
import {RuntimeCompiler} from 'angular2/src/core/compiler/runtime_compiler';
import {RuntimeCompiler} from 'angular2/src/compiler/runtime_compiler';
import {ProtoViewFactory} from 'angular2/src/core/linker/proto_view_factory';
import {AppProtoView} from 'angular2/src/core/linker/view';

View File

@ -14,7 +14,7 @@ import {
} from 'angular2/testing_internal';
import {stringify} from 'angular2/src/core/facade/lang';
import {RuntimeMetadataResolver} from 'angular2/src/core/compiler/runtime_metadata';
import {RuntimeMetadataResolver} from 'angular2/src/compiler/runtime_metadata';
import {LifecycleHooks, LIFECYCLE_HOOKS_VALUES} from 'angular2/src/core/linker/interfaces';
import {
Component,
@ -35,8 +35,9 @@ import {
} from 'angular2/core';
import {TEST_PROVIDERS} from './test_bindings';
import {MODULE_SUFFIX, IS_DART} from 'angular2/src/core/compiler/util';
import {AMBIENT_DIRECTIVES} from 'angular2/src/core/compiler/ambient';
import {MODULE_SUFFIX} from 'angular2/src/compiler/util';
import {IS_DART} from 'angular2/src/core/facade/lang';
import {AMBIENT_DIRECTIVES} from 'angular2/src/core/ambient';
export function main() {
describe('RuntimeMetadataResolver', () => {
@ -71,8 +72,7 @@ export function main() {
inject([RuntimeMetadataResolver], (resolver: RuntimeMetadataResolver) => {
var value: string = resolver.getMetadata(DirectiveWithoutModuleId).type.moduleUrl;
var expectedEndValue =
IS_DART ? 'base/dist/dart/angular2/test/core/compiler/runtime_metadata_spec.dart' :
'./';
IS_DART ? 'base/dist/dart/angular2/test/compiler/runtime_metadata_spec.dart' : './';
expect((<any>value).endsWith(expectedEndValue)).toBe(true);
}));
});

View File

@ -9,11 +9,9 @@ import {
it,
xit
} from 'angular2/testing_internal';
import {IS_DART} from '../../../platform';
import {IS_DART} from 'angular2/src/core/facade/lang';
import {
DomElementSchemaRegistry
} from 'angular2/src/core/compiler/schema/dom_element_schema_registry';
import {DomElementSchemaRegistry} from 'angular2/src/compiler/schema/dom_element_schema_registry';
export function main() {
// DOMElementSchema can only be used on the JS side where we can safely

View File

@ -1,4 +1,4 @@
import {ElementSchemaRegistry} from 'angular2/src/core/compiler/schema/element_schema_registry';
import {ElementSchemaRegistry} from 'angular2/src/compiler/schema/element_schema_registry';
import {isPresent} from 'angular2/src/core/facade/lang';
export class MockSchemaRegistry implements ElementSchemaRegistry {

View File

@ -1,7 +1,7 @@
import {describe, it, expect, beforeEach, ddescribe, iit, xit, el} from 'angular2/testing_internal';
import {DOM} from 'angular2/src/core/dom/dom_adapter';
import {SelectorMatcher} from 'angular2/src/core/compiler/selector';
import {CssSelector} from 'angular2/src/core/compiler/selector';
import {SelectorMatcher} from 'angular2/src/compiler/selector';
import {CssSelector} from 'angular2/src/compiler/selector';
import {ListWrapper, MapWrapper} from 'angular2/src/core/facade/collection';
export function main() {

View File

@ -9,7 +9,7 @@ import {
el,
normalizeCSS
} from 'angular2/testing_internal';
import {ShadowCss, processRules, CssRule} from 'angular2/src/core/compiler/shadow_css';
import {ShadowCss, processRules, CssRule} from 'angular2/src/compiler/shadow_css';
import {RegExpWrapper, StringWrapper, isPresent} from 'angular2/src/core/facade/lang';

View File

@ -12,7 +12,7 @@ import {
TestComponentBuilder
} from 'angular2/testing_internal';
import {SourceModule, moduleRef} from 'angular2/src/core/compiler/source_module';
import {SourceModule, moduleRef} from 'angular2/src/compiler/source_module';
export function main() {
describe('SourceModule', () => {

View File

@ -0,0 +1,9 @@
library core.spies;
import 'package:angular2/src/compiler/xhr.dart';
import 'package:angular2/testing_internal.dart';
@proxy
class SpyXHR extends SpyObject implements XHR {
noSuchMethod(m) => super.noSuchMethod(m);
}

View File

@ -0,0 +1,7 @@
import {XHR} from 'angular2/src/compiler/xhr';
import {SpyObject, proxy} from 'angular2/testing_internal';
export class SpyXHR extends SpyObject {
constructor() { super(XHR); }
}

View File

@ -13,35 +13,31 @@ import {
beforeEachBindings
} from 'angular2/testing_internal';
import {provide} from 'angular2/src/core/di';
import {SpyXHR} from '../spies';
import {XHR} from 'angular2/src/core/compiler/xhr';
import {SpyXHR} from './spies';
import {XHR} from 'angular2/src/compiler/xhr';
import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
import {CONST_EXPR, isPresent, isBlank, StringWrapper} from 'angular2/src/core/facade/lang';
import {PromiseWrapper, Promise} from 'angular2/src/core/facade/async';
import {evalModule} from './eval_module';
import {StyleCompiler} from 'angular2/src/core/compiler/style_compiler';
import {StyleCompiler} from 'angular2/src/compiler/style_compiler';
import {
CompileDirectiveMetadata,
CompileTemplateMetadata,
CompileTypeMetadata
} from 'angular2/src/core/compiler/directive_metadata';
import {SourceExpression, SourceModule} from 'angular2/src/core/compiler/source_module';
} from 'angular2/src/compiler/directive_metadata';
import {SourceExpression, SourceModule} from 'angular2/src/compiler/source_module';
import {ViewEncapsulation} from 'angular2/src/core/metadata/view';
import {TEST_PROVIDERS} from './test_bindings';
import {
codeGenValueFn,
codeGenExportVariable,
MODULE_SUFFIX
} from 'angular2/src/core/compiler/util';
import {codeGenValueFn, codeGenExportVariable, MODULE_SUFFIX} from 'angular2/src/compiler/util';
// Attention: These module names have to correspond to real modules!
var MODULE_URL = `package:angular2/test/core/compiler/style_compiler_spec${MODULE_SUFFIX}`;
var IMPORT_ABS_STYLESHEET_URL = `package:angular2/test/core/compiler/style_compiler_import.css`;
var MODULE_URL = `package:angular2/test/compiler/style_compiler_spec${MODULE_SUFFIX}`;
var IMPORT_ABS_STYLESHEET_URL = `package:angular2/test/compiler/style_compiler_import.css`;
var IMPORT_REL_STYLESHEET_URL = './style_compiler_import.css';
// Note: Not a real module, only used via mocks.
var IMPORT_ABS_STYLESHEET_URL_WITH_IMPORT =
`package:angular2/test/core/compiler/style_compiler_transitive_import.css`;
`package:angular2/test/compiler/style_compiler_transitive_import.css`;
export function main() {
describe('StyleCompiler', () => {

View File

@ -1,10 +1,7 @@
import {describe, it, expect, beforeEach, ddescribe, iit, xit, el} from 'angular2/testing_internal';
import {
extractStyleUrls,
isStyleUrlResolvable
} from 'angular2/src/core/compiler/style_url_resolver';
import {extractStyleUrls, isStyleUrlResolvable} from 'angular2/src/compiler/style_url_resolver';
import {UrlResolver} from 'angular2/src/core/compiler/url_resolver';
import {UrlResolver} from 'angular2/src/compiler/url_resolver';
export function main() {
describe('extractStyleUrls', () => {

View File

@ -16,16 +16,16 @@ import {
import {Promise, PromiseWrapper} from 'angular2/src/core/facade/async';
import {Type, isPresent, isBlank, stringify, isString} from 'angular2/src/core/facade/lang';
import {MapWrapper, SetWrapper, ListWrapper} from 'angular2/src/core/facade/collection';
import {RuntimeMetadataResolver} from 'angular2/src/core/compiler/runtime_metadata';
import {RuntimeMetadataResolver} from 'angular2/src/compiler/runtime_metadata';
import {
TemplateCompiler,
NormalizedComponentWithViewDirectives
} from 'angular2/src/core/compiler/template_compiler';
import {CompileDirectiveMetadata} from 'angular2/src/core/compiler/directive_metadata';
} from 'angular2/src/compiler/template_compiler';
import {CompileDirectiveMetadata} from 'angular2/src/compiler/directive_metadata';
import {evalModule} from './eval_module';
import {SourceModule, moduleRef} from 'angular2/src/core/compiler/source_module';
import {XHR} from 'angular2/src/core/compiler/xhr';
import {MockXHR} from 'angular2/src/core/compiler/xhr_mock';
import {SourceModule, moduleRef} from 'angular2/src/compiler/source_module';
import {XHR} from 'angular2/src/compiler/xhr';
import {MockXHR} from 'angular2/src/compiler/xhr_mock';
import {ViewEncapsulation} from 'angular2/src/core/metadata/view';
import {Locals} from 'angular2/src/core/change_detection/change_detection';
@ -46,15 +46,11 @@ import {Component, View, Directive, provide} from 'angular2/core';
import {TEST_PROVIDERS} from './test_bindings';
import {TestDispatcher, TestPipes} from './change_detector_mocks';
import {
codeGenValueFn,
codeGenExportVariable,
MODULE_SUFFIX
} from 'angular2/src/core/compiler/util';
import {codeGenValueFn, codeGenExportVariable, MODULE_SUFFIX} from 'angular2/src/compiler/util';
import {APP_ID} from 'angular2/src/core/application_tokens';
// Attention: This path has to point to this test file!
const THIS_MODULE_ID = 'angular2/test/core/compiler/template_compiler_spec';
const THIS_MODULE_ID = 'angular2/test/compiler/template_compiler_spec';
var THIS_MODULE_REF = moduleRef(`package:${THIS_MODULE_ID}${MODULE_SUFFIX}`);
const APP_ID_VALUE = 'app1';
@ -141,7 +137,7 @@ export function main() {
it('should cache components for parallel requests',
inject([AsyncTestCompleter, XHR], (async, xhr: MockXHR) => {
xhr.expect('package:angular2/test/core/compiler/compUrl.html', 'a');
xhr.expect('package:angular2/test/compiler/compUrl.html', 'a');
PromiseWrapper.all([compile([CompWithTemplateUrl]), compile([CompWithTemplateUrl])])
.then((humanizedTemplates) => {
expect(humanizedTemplates[0]['commands'][1]['commands']).toEqual(['#text(a)']);
@ -154,7 +150,7 @@ export function main() {
it('should cache components for sequential requests',
inject([AsyncTestCompleter, XHR], (async, xhr: MockXHR) => {
xhr.expect('package:angular2/test/core/compiler/compUrl.html', 'a');
xhr.expect('package:angular2/test/compiler/compUrl.html', 'a');
compile([CompWithTemplateUrl])
.then((humanizedTemplate0) => {
return compile([CompWithTemplateUrl])
@ -171,11 +167,11 @@ export function main() {
it('should allow to clear the cache',
inject([AsyncTestCompleter, XHR], (async, xhr: MockXHR) => {
xhr.expect('package:angular2/test/core/compiler/compUrl.html', 'a');
xhr.expect('package:angular2/test/compiler/compUrl.html', 'a');
compile([CompWithTemplateUrl])
.then((humanizedTemplate) => {
compiler.clearCache();
xhr.expect('package:angular2/test/core/compiler/compUrl.html', 'b');
xhr.expect('package:angular2/test/compiler/compUrl.html', 'b');
var result = compile([CompWithTemplateUrl]);
xhr.flush();
return result;
@ -231,7 +227,7 @@ export function main() {
it('should normalize the template',
inject([AsyncTestCompleter, XHR], (async, xhr: MockXHR) => {
xhr.expect('package:angular2/test/core/compiler/compUrl.html', 'loadedTemplate');
xhr.expect('package:angular2/test/compiler/compUrl.html', 'loadedTemplate');
compiler.normalizeDirectiveMetadata(
runtimeMetadataResolver.getMetadata(CompWithTemplateUrl))
.then((meta: CompileDirectiveMetadata) => {

View File

@ -16,12 +16,12 @@ import {
import {
CompileTypeMetadata,
CompileTemplateMetadata
} from 'angular2/src/core/compiler/directive_metadata';
} from 'angular2/src/compiler/directive_metadata';
import {ViewEncapsulation} from 'angular2/src/core/metadata/view';
import {TemplateNormalizer} from 'angular2/src/core/compiler/template_normalizer';
import {XHR} from 'angular2/src/core/compiler/xhr';
import {MockXHR} from 'angular2/src/core/compiler/xhr_mock';
import {TemplateNormalizer} from 'angular2/src/compiler/template_normalizer';
import {XHR} from 'angular2/src/compiler/xhr';
import {MockXHR} from 'angular2/src/compiler/xhr_mock';
import {TEST_PROVIDERS} from './test_bindings';
export function main() {

View File

@ -14,12 +14,12 @@ import {provide} from 'angular2/src/core/di';
import {TEST_PROVIDERS} from './test_bindings';
import {isPresent} from 'angular2/src/core/facade/lang';
import {TemplateParser, splitClasses} from 'angular2/src/core/compiler/template_parser';
import {TemplateParser, splitClasses} from 'angular2/src/compiler/template_parser';
import {
CompileDirectiveMetadata,
CompileTypeMetadata,
CompileTemplateMetadata
} from 'angular2/src/core/compiler/directive_metadata';
} from 'angular2/src/compiler/directive_metadata';
import {
templateVisitAll,
TemplateAstVisitor,
@ -36,12 +36,12 @@ import {
TextAst,
PropertyBindingType,
DirectiveAst
} from 'angular2/src/core/compiler/template_ast';
} from 'angular2/src/compiler/template_ast';
import {ElementSchemaRegistry} from 'angular2/src/core/compiler/schema/element_schema_registry';
import {ElementSchemaRegistry} from 'angular2/src/compiler/schema/element_schema_registry';
import {MockSchemaRegistry} from './schema_registry_mock';
import {Unparser} from '../change_detection/parser/unparser';
import {Unparser} from '../core/change_detection/parser/unparser';
var expressionUnparser = new Unparser();

View File

@ -13,12 +13,12 @@ import {
beforeEachBindings
} from 'angular2/testing_internal';
import {HtmlParser} from 'angular2/src/core/compiler/html_parser';
import {HtmlParser} from 'angular2/src/compiler/html_parser';
import {
preparseElement,
PreparsedElementType,
PreparsedElement
} from 'angular2/src/core/compiler/template_preparser';
} from 'angular2/src/compiler/template_preparser';
export function main() {
describe('preparseElement', () => {

View File

@ -1,9 +1,9 @@
import {provide, Provider} from 'angular2/src/core/di';
import {MockSchemaRegistry} from './schema_registry_mock';
import {ElementSchemaRegistry} from 'angular2/src/core/compiler/schema/element_schema_registry';
import {MockXHR} from 'angular2/src/core/compiler/xhr_mock';
import {XHR} from 'angular2/src/core/compiler/xhr';
import {UrlResolver, createWithoutPackagePrefix} from 'angular2/src/core/compiler/url_resolver';
import {ElementSchemaRegistry} from 'angular2/src/compiler/schema/element_schema_registry';
import {MockXHR} from 'angular2/src/compiler/xhr_mock';
import {XHR} from 'angular2/src/compiler/xhr';
import {UrlResolver, createWithoutPackagePrefix} from 'angular2/src/compiler/url_resolver';
export var TEST_PROVIDERS = [
provide(ElementSchemaRegistry, {useValue: new MockSchemaRegistry({}, {})}),

View File

@ -1,5 +1,5 @@
import {describe, it, expect, beforeEach, ddescribe, iit, xit, el} from 'angular2/testing_internal';
import {UrlResolver} from 'angular2/src/core/compiler/url_resolver';
import {UrlResolver} from 'angular2/src/compiler/url_resolver';
export function main() {
describe('UrlResolver', () => {

View File

@ -12,8 +12,8 @@ import {
TestComponentBuilder
} from 'angular2/testing_internal';
import {IS_DART} from '../../platform';
import {escapeSingleQuoteString, escapeDoubleQuoteString} from 'angular2/src/core/compiler/util';
import {IS_DART} from 'angular2/src/core/facade/lang';
import {escapeSingleQuoteString, escapeDoubleQuoteString} from 'angular2/src/compiler/util';
export function main() {
describe('util', () => {

View File

@ -10,7 +10,7 @@ import {
xit
} from 'angular2/testing_internal';
import {XHRImpl} from 'angular2/src/core/compiler/xhr_impl';
import {XHRImpl} from 'angular2/src/compiler/xhr_impl';
import {PromiseWrapper} from 'angular2/src/core/facade/async';
export function main() {

View File

@ -9,7 +9,7 @@ import {
inject,
it,
} from 'angular2/testing_internal';
import {MockXHR} from 'angular2/src/core/compiler/xhr_mock';
import {MockXHR} from 'angular2/src/compiler/xhr_mock';
import {PromiseWrapper, Promise} from 'angular2/src/core/facade/async';
import {isPresent} from 'angular2/src/core/facade/lang';

View File

@ -10,7 +10,7 @@ import {
xdescribe,
xit
} from 'angular2/testing_internal';
import {isPresent, stringify} from 'angular2/src/core/facade/lang';
import {IS_DART, isPresent, stringify} from 'angular2/src/core/facade/lang';
import {bootstrap} from 'angular2/bootstrap';
import {ApplicationRef} from 'angular2/src/core/application_ref';
import {Component, Directive, View} from 'angular2/core';
@ -20,7 +20,6 @@ import {PromiseWrapper} from 'angular2/src/core/facade/async';
import {provide, Inject, Injector} from 'angular2/core';
import {ExceptionHandler} from 'angular2/src/core/facade/exceptions';
import {Testability, TestabilityRegistry} from 'angular2/src/core/testability/testability';
import {IS_DART} from '../platform';
import {ComponentRef_} from "angular2/src/core/linker/dynamic_component_loader";
@Component({selector: 'hello-app'})

View File

@ -52,7 +52,7 @@ import {JitProtoChangeDetector} from 'angular2/src/core/change_detection/jit_pro
import {getDefinition} from './change_detector_config';
import {createObservableModel} from './change_detector_spec_util';
import {getFactoryById} from './generated/change_detector_classes';
import {IS_DART} from '../../platform';
import {IS_DART} from 'angular2/src/core/facade/lang';
const _DEFAULT_CONTEXT = CONST_EXPR(new Object());

View File

@ -17,7 +17,7 @@ import {global} from 'angular2/src/core/facade/lang';
import {APP_VIEW_POOL_CAPACITY} from 'angular2/src/core/linker/view_pool';
import {provide, Component, Directive, Injectable, View} from 'angular2/core';
import {inspectNativeElement} from 'angular2/src/core/debug';
import {IS_DART} from '../../platform';
import {IS_DART} from 'angular2/src/core/facade/lang';
@Component({selector: 'my-comp'})
@View({directives: []})

View File

@ -16,7 +16,7 @@ import {DOM} from 'angular2/src/core/dom/dom_adapter';
import {Component, View, NgIf} from 'angular2/core';
import {IS_DART} from '../../platform';
import {IS_DART} from 'angular2/src/core/facade/lang';
export function main() {
describe('ng-if directive', () => {

View File

@ -17,7 +17,7 @@ import {ControlGroup, Control, ControlArray, Validators} from 'angular2/core';
import {isPresent, CONST_EXPR} from 'angular2/src/core/facade/lang';
import {PromiseWrapper} from 'angular2/src/core/facade/promise';
import {TimerWrapper, ObservableWrapper} from 'angular2/src/core/facade/async';
import {IS_DART} from '../../platform';
import {IS_DART} from 'angular2/src/core/facade/lang';
export function main() {
function asyncValidator(expected, timeouts = CONST_EXPR({})) {

View File

@ -92,7 +92,7 @@ import {ElementRef} from 'angular2/src/core/linker/element_ref';
import {TemplateRef} from 'angular2/src/core/linker/template_ref';
import {DomRenderer} from 'angular2/src/core/render/dom/dom_renderer';
import {IS_DART} from '../../platform';
import {IS_DART} from 'angular2/src/core/facade/lang';
const ANCHOR_ELEMENT = CONST_EXPR(new OpaqueToken('AnchorElement'));

View File

@ -10,10 +10,8 @@ import {
fakeAsync,
tick
} from 'angular2/testing_internal';
import {IS_DART} from '../../platform';
import {MapWrapper, ListWrapper, iterateListLike} from 'angular2/src/core/facade/collection';
import {StringWrapper} from 'angular2/src/core/facade/lang';
import {IS_DART, StringWrapper} from 'angular2/src/core/facade/lang';
import {ObservableWrapper} from 'angular2/src/core/facade/async';
import {QueryList} from 'angular2/src/core/linker/query_list';
import {DOM} from 'angular2/src/core/dom/dom_adapter';

View File

@ -18,7 +18,7 @@ import {
propDecorator,
HasGetterAndSetterDecorators
} from './reflector_common';
import {IS_DART} from '../../platform';
import {IS_DART} from 'angular2/src/core/facade/lang';
class AType {
value;

View File

@ -14,7 +14,6 @@ import 'package:angular2/src/core/linker/view_listener.dart';
import 'package:angular2/src/core/linker/element_injector.dart';
import 'package:angular2/src/core/dom/dom_adapter.dart';
import 'package:angular2/testing_internal.dart';
import 'package:angular2/src/core/compiler/xhr.dart';
@proxy
class SpyDependencyProvider extends SpyObject implements DependencyProvider {
@ -103,11 +102,6 @@ class SpyDomAdapter extends SpyObject implements DomAdapter {
noSuchMethod(m) => super.noSuchMethod(m);
}
@proxy
class SpyXHR extends SpyObject implements XHR {
noSuchMethod(m) => super.noSuchMethod(m);
}
@proxy
class SpyRenderEventDispatcher extends SpyObject
implements RenderEventDispatcher {

View File

@ -16,7 +16,6 @@ import {AppViewListener} from 'angular2/src/core/linker/view_listener';
import {ProtoViewFactory} from 'angular2/src/core/linker/proto_view_factory';
import {DomAdapter} from 'angular2/src/core/dom/dom_adapter';
import {ClientMessageBroker} from 'angular2/src/web_workers/shared/client_message_broker';
import {XHR} from 'angular2/src/core/compiler/xhr';
import {
ElementInjector,
@ -98,10 +97,6 @@ export class SpyDomAdapter extends SpyObject {
constructor() { super(DomAdapter); }
}
export class SpyXHR extends SpyObject {
constructor() { super(XHR); }
}
export class SpyRenderEventDispatcher extends SpyObject {
constructor() {
// Note: RenderEventDispatcher is an interface,

View File

@ -1,3 +0,0 @@
library angular2.test.platform;
const IS_DART = true;

View File

@ -1 +0,0 @@
export const IS_DART = false;

View File

@ -22,7 +22,7 @@ import {
AsyncRoute
} from 'angular2/src/router/route_config_decorator';
import {stringifyInstruction} from 'angular2/src/router/instruction';
import {IS_DART} from '../platform';
import {IS_DART} from 'angular2/src/core/facade/lang';
export function main() {
describe('RouteRegistry', () => {

View File

@ -16,8 +16,8 @@ import {
import {Injectable, NgIf, bind} from 'angular2/core';
import {Directive, Component, View, ViewMetadata} from 'angular2/angular2';
import {XHR} from 'angular2/src/core/compiler/xhr';
import {XHRImpl} from 'angular2/src/core/compiler/xhr_impl';
import {XHR} from 'angular2/src/compiler/xhr';
import {XHRImpl} from 'angular2/src/compiler/xhr_impl';
// Services, and components for the tests.

View File

@ -1,7 +1,7 @@
library ng_material.test_url_resolver;
import 'package:angular2/src/core/dom/browser_adapter.dart';
import 'package:angular2/src/core/compiler/url_resolver.dart';
import 'package:angular2/src/compiler/url_resolver.dart';
void commonDemoSetup() {
BrowserDomAdapter.makeCurrent();

Some files were not shown because too many files have changed in this diff Show More