2016-04-07 17:17:50 -07:00
|
|
|
import {RuntimeCompiler_} from './runtime_compiler';
|
2015-09-14 15:59:09 -07:00
|
|
|
export {TemplateCompiler} from './template_compiler';
|
2016-04-07 17:17:50 -07:00
|
|
|
export {CompileDirectiveMetadata, CompileTypeMetadata, CompileTemplateMetadata} from './directive_metadata';
|
2015-09-14 15:59:09 -07:00
|
|
|
export {SourceModule, SourceWithImports} from './source_module';
|
2015-11-09 14:33:22 -08:00
|
|
|
export {PLATFORM_DIRECTIVES, PLATFORM_PIPES} from 'angular2/src/core/platform_directives_and_pipes';
|
2015-12-03 16:14:34 -08:00
|
|
|
export * from 'angular2/src/compiler/template_ast';
|
|
|
|
export {TEMPLATE_TRANSFORMS} from 'angular2/src/compiler/template_parser';
|
2015-11-13 11:21:16 -08:00
|
|
|
import {assertionsEnabled, Type, CONST_EXPR} from 'angular2/src/facade/lang';
|
2015-10-10 22:11:13 -07:00
|
|
|
import {provide, Provider} from 'angular2/src/core/di';
|
2015-11-05 14:07:57 -08:00
|
|
|
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';
|
2015-12-02 10:35:51 -08:00
|
|
|
import {ViewCompiler} from 'angular2/src/compiler/view_compiler';
|
|
|
|
import {ProtoViewCompiler} from 'angular2/src/compiler/proto_view_compiler';
|
2015-11-05 14:07:57 -08:00
|
|
|
import {TemplateCompiler} from 'angular2/src/compiler/template_compiler';
|
2015-09-18 10:33:23 -07:00
|
|
|
import {ChangeDetectorGenConfig} from 'angular2/src/core/change_detection/change_detection';
|
2015-10-02 07:37:23 -07:00
|
|
|
import {Compiler} from 'angular2/src/core/linker/compiler';
|
2015-11-05 14:07:57 -08:00
|
|
|
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';
|
2015-12-05 02:21:38 -08:00
|
|
|
import {UrlResolver, DEFAULT_PACKAGE_URL_PROVIDER} from 'angular2/src/compiler/url_resolver';
|
2015-10-02 11:10:08 -07:00
|
|
|
import {Parser, Lexer} from 'angular2/src/core/change_detection/change_detection';
|
2015-09-18 10:33:23 -07:00
|
|
|
|
2015-11-13 11:21:16 -08:00
|
|
|
function _createChangeDetectorGenConfig() {
|
|
|
|
return new ChangeDetectorGenConfig(assertionsEnabled(), false, true);
|
2015-09-18 10:33:23 -07:00
|
|
|
}
|
2015-11-13 11:21:16 -08:00
|
|
|
|
2015-12-03 15:49:09 -08:00
|
|
|
/**
|
|
|
|
* A set of providers that provide `RuntimeCompiler` and its dependencies to use for
|
|
|
|
* template compilation.
|
|
|
|
*/
|
2016-04-07 17:17:50 -07:00
|
|
|
export const COMPILER_PROVIDERS: Array<Type|Provider|any[]> = CONST_EXPR([
|
|
|
|
Lexer, Parser, HtmlParser, TemplateParser, TemplateNormalizer, RuntimeMetadataResolver,
|
|
|
|
DEFAULT_PACKAGE_URL_PROVIDER, StyleCompiler, ProtoViewCompiler, ViewCompiler,
|
2015-11-13 11:21:16 -08:00
|
|
|
ChangeDetectionCompiler,
|
|
|
|
new Provider(ChangeDetectorGenConfig, {useFactory: _createChangeDetectorGenConfig, deps: []}),
|
2016-04-07 17:17:50 -07:00
|
|
|
TemplateCompiler, new Provider(RuntimeCompiler, {useClass: RuntimeCompiler_}),
|
|
|
|
new Provider(Compiler, {useExisting: RuntimeCompiler}), DomElementSchemaRegistry,
|
|
|
|
new Provider(ElementSchemaRegistry, {useExisting: DomElementSchemaRegistry}), UrlResolver
|
2015-11-13 11:21:16 -08:00
|
|
|
]);
|