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

committed by
Victor Berchet

parent
8cb1046ce9
commit
979657989b
@ -1,103 +0,0 @@
|
||||
/**
|
||||
* @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_DebugAppView__, __core_private_TemplateRef__, __core_private__ as r, __core_private_types__ as types} from '@angular/core';
|
||||
|
||||
export declare let _compiler_core_private_types: types;
|
||||
|
||||
export var isDefaultChangeDetectionStrategy: typeof r.isDefaultChangeDetectionStrategy =
|
||||
r.isDefaultChangeDetectionStrategy;
|
||||
export type ChangeDetectorStatus = typeof _compiler_core_private_types.ChangeDetectorStatus;
|
||||
export var ChangeDetectorStatus: typeof r.ChangeDetectorStatus = r.ChangeDetectorStatus;
|
||||
export var CHANGE_DETECTION_STRATEGY_VALUES: typeof r.CHANGE_DETECTION_STRATEGY_VALUES =
|
||||
r.CHANGE_DETECTION_STRATEGY_VALUES;
|
||||
export var constructDependencies: typeof r.constructDependencies = r.constructDependencies;
|
||||
export type LifecycleHooks = typeof _compiler_core_private_types.LifecycleHooks;
|
||||
export var LifecycleHooks: typeof r.LifecycleHooks = r.LifecycleHooks;
|
||||
export var LIFECYCLE_HOOKS_VALUES: typeof r.LIFECYCLE_HOOKS_VALUES = r.LIFECYCLE_HOOKS_VALUES;
|
||||
export type ReflectorReader = typeof _compiler_core_private_types.ReflectorReader;
|
||||
export var ReflectorReader: typeof r.ReflectorReader = r.ReflectorReader;
|
||||
export type AppElement = typeof _compiler_core_private_types.AppElement;
|
||||
export var AppElement: typeof r.AppElement = r.AppElement;
|
||||
export var CodegenComponentFactoryResolver: typeof r.CodegenComponentFactoryResolver =
|
||||
r.CodegenComponentFactoryResolver;
|
||||
export var AppView: typeof r.AppView = r.AppView;
|
||||
export type DebugAppView<T> = __core_private_DebugAppView__<T>;
|
||||
export var DebugAppView: typeof r.DebugAppView = r.DebugAppView;
|
||||
export var NgModuleInjector: typeof r.NgModuleInjector = r.NgModuleInjector;
|
||||
export type ViewType = typeof _compiler_core_private_types.ViewType;
|
||||
export var ViewType: typeof r.ViewType = r.ViewType;
|
||||
export var MAX_INTERPOLATION_VALUES: typeof r.MAX_INTERPOLATION_VALUES = r.MAX_INTERPOLATION_VALUES;
|
||||
export var checkBinding: typeof r.checkBinding = r.checkBinding;
|
||||
export var flattenNestedViewRenderNodes: typeof r.flattenNestedViewRenderNodes =
|
||||
r.flattenNestedViewRenderNodes;
|
||||
export var interpolate: typeof r.interpolate = r.interpolate;
|
||||
export var ViewUtils: typeof r.ViewUtils = r.ViewUtils;
|
||||
export var VIEW_ENCAPSULATION_VALUES: typeof r.VIEW_ENCAPSULATION_VALUES =
|
||||
r.VIEW_ENCAPSULATION_VALUES;
|
||||
export var DebugContext: typeof r.DebugContext = r.DebugContext;
|
||||
export var StaticNodeDebugInfo: typeof r.StaticNodeDebugInfo = r.StaticNodeDebugInfo;
|
||||
export var devModeEqual: typeof r.devModeEqual = r.devModeEqual;
|
||||
export var UNINITIALIZED: typeof r.UNINITIALIZED = r.UNINITIALIZED;
|
||||
export var ValueUnwrapper: typeof _compiler_core_private_types.ValueUnwrapper = r.ValueUnwrapper;
|
||||
export type TemplateRef_<T> = __core_private_TemplateRef__<T>;
|
||||
export var TemplateRef_: typeof r.TemplateRef_ = r.TemplateRef_;
|
||||
export type RenderDebugInfo = typeof _compiler_core_private_types.RenderDebugInfo;
|
||||
export var RenderDebugInfo: typeof r.RenderDebugInfo = r.RenderDebugInfo;
|
||||
export var EMPTY_ARRAY: typeof r.EMPTY_ARRAY = r.EMPTY_ARRAY;
|
||||
export var EMPTY_MAP: typeof r.EMPTY_MAP = r.EMPTY_MAP;
|
||||
export var pureProxy1: typeof r.pureProxy1 = r.pureProxy1;
|
||||
export var pureProxy2: typeof r.pureProxy2 = r.pureProxy2;
|
||||
export var pureProxy3: typeof r.pureProxy3 = r.pureProxy3;
|
||||
export var pureProxy4: typeof r.pureProxy4 = r.pureProxy4;
|
||||
export var pureProxy5: typeof r.pureProxy5 = r.pureProxy5;
|
||||
export var pureProxy6: typeof r.pureProxy6 = r.pureProxy6;
|
||||
export var pureProxy7: typeof r.pureProxy7 = r.pureProxy7;
|
||||
export var pureProxy8: typeof r.pureProxy8 = r.pureProxy8;
|
||||
export var pureProxy9: typeof r.pureProxy9 = r.pureProxy9;
|
||||
export var pureProxy10: typeof r.pureProxy10 = r.pureProxy10;
|
||||
export var castByValue: typeof r.castByValue = r.castByValue;
|
||||
export type Console = typeof _compiler_core_private_types.Console;
|
||||
export var Console: typeof r.Console = r.Console;
|
||||
export var reflector: typeof _compiler_core_private_types.Reflector = r.reflector;
|
||||
export var Reflector: typeof r.Reflector = r.Reflector;
|
||||
export type Reflector = typeof _compiler_core_private_types.Reflector;
|
||||
export type ReflectionCapabilities = typeof _compiler_core_private_types.ReflectionCapabilities;
|
||||
export var ReflectionCapabilities: typeof r.ReflectionCapabilities = r.ReflectionCapabilities;
|
||||
export type NoOpAnimationPlayer = typeof _compiler_core_private_types.NoOpAnimationPlayer;
|
||||
export var NoOpAnimationPlayer: typeof r.NoOpAnimationPlayer = r.NoOpAnimationPlayer;
|
||||
export type AnimationPlayer = typeof _compiler_core_private_types.AnimationPlayer;
|
||||
export var AnimationPlayer: typeof r.AnimationPlayer = r.AnimationPlayer;
|
||||
export type AnimationSequencePlayer = typeof _compiler_core_private_types.AnimationSequencePlayer;
|
||||
export var AnimationSequencePlayer: typeof r.AnimationSequencePlayer = r.AnimationSequencePlayer;
|
||||
export type AnimationGroupPlayer = typeof _compiler_core_private_types.AnimationGroupPlayer;
|
||||
export var AnimationGroupPlayer: typeof r.AnimationGroupPlayer = r.AnimationGroupPlayer;
|
||||
export type AnimationKeyframe = typeof _compiler_core_private_types.AnimationKeyframe;
|
||||
export var AnimationKeyframe: typeof r.AnimationKeyframe = r.AnimationKeyframe;
|
||||
export type AnimationStyles = typeof _compiler_core_private_types.AnimationStyles;
|
||||
export var AnimationStyles: typeof r.AnimationStyles = r.AnimationStyles;
|
||||
export type AnimationOutput = typeof _compiler_core_private_types.AnimationOutput;
|
||||
export var AnimationOutput: typeof r.AnimationOutput = r.AnimationOutput;
|
||||
export var ANY_STATE = r.ANY_STATE;
|
||||
export var DEFAULT_STATE = r.DEFAULT_STATE;
|
||||
export var EMPTY_STATE = r.EMPTY_STATE;
|
||||
export var FILL_STYLE_FLAG = r.FILL_STYLE_FLAG;
|
||||
export var prepareFinalAnimationStyles: typeof r.prepareFinalAnimationStyles =
|
||||
r.prepareFinalAnimationStyles;
|
||||
export var balanceAnimationKeyframes: typeof r.balanceAnimationKeyframes =
|
||||
r.balanceAnimationKeyframes;
|
||||
export var flattenStyles: typeof r.flattenStyles = r.flattenStyles;
|
||||
export var clearStyles: typeof r.clearStyles = r.clearStyles;
|
||||
export var collectAndResolveStyles: typeof r.collectAndResolveStyles = r.collectAndResolveStyles;
|
||||
export var renderStyles: typeof r.renderStyles = r.renderStyles;
|
||||
export type ViewMetadata = typeof _compiler_core_private_types.ViewMetadata;
|
||||
export var ViewMetadata: typeof r.ViewMetadata = r.ViewMetadata;
|
||||
export type ComponentStillLoadingError =
|
||||
typeof _compiler_core_private_types.ComponentStillLoadingError;
|
||||
export var ComponentStillLoadingError: typeof r.ComponentStillLoadingError =
|
||||
r.ComponentStillLoadingError;
|
@ -1,17 +0,0 @@
|
||||
/**
|
||||
* @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_testing__ as r, __core_private_testing_types__ as types} from '@angular/core/testing';
|
||||
|
||||
export declare let _compiler_core_testing_types: types;
|
||||
|
||||
export type TestingCompiler = typeof _compiler_core_testing_types.TestingCompiler;
|
||||
export var TestingCompiler: typeof r.TestingCompiler = r.TestingCompiler;
|
||||
|
||||
export type TestingCompilerFactory = typeof _compiler_core_testing_types.TestingCompilerFactory;
|
||||
export var TestingCompilerFactory: typeof r.TestingCompilerFactory = r.TestingCompilerFactory;
|
@ -9,14 +9,18 @@
|
||||
/**
|
||||
* @module
|
||||
* @description
|
||||
* Starting point to import all compiler APIs.
|
||||
* Entry point for all APIs of the compiler package.
|
||||
*
|
||||
* <div class="callout is-critical">
|
||||
* <header>Unstable APIs</header>
|
||||
* <p>
|
||||
* All compiler apis are currently considered experimental and private!
|
||||
* </p>
|
||||
* <p>
|
||||
* We expect the APIs in this package to keep on changing. Do not rely on them.
|
||||
* </p>
|
||||
* </div>
|
||||
*/
|
||||
import * as i18n from './src/i18n/index';
|
||||
export * from './src/index';
|
||||
|
||||
export {COMPILER_PROVIDERS, CompileDiDependencyMetadata, CompileDirectiveMetadata, CompileFactoryMetadata, CompileIdentifierMetadata, CompileMetadataWithIdentifier, CompilePipeMetadata, CompileProviderMetadata, CompileQueryMetadata, CompileTemplateMetadata, CompileTokenMetadata, CompileTypeMetadata, CompilerConfig, DEFAULT_PACKAGE_URL_PROVIDER, DirectiveResolver, NgModuleResolver, OfflineCompiler, PipeResolver, RenderTypes, ResourceLoader, RuntimeCompiler, SourceModule, TEMPLATE_TRANSFORMS, UrlResolver, createOfflineCompileUrlResolver, platformCoreDynamic} from './src/compiler';
|
||||
export {DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig} from './src/ml_parser/interpolation_config';
|
||||
export {ElementSchemaRegistry} from './src/schema/element_schema_registry';
|
||||
export {i18n};
|
||||
|
||||
export * from './src/template_parser/template_ast';
|
||||
export * from './private_export';
|
||||
// This file only reexports content of the `src` folder. Keep it that way.
|
||||
|
@ -1,9 +1,9 @@
|
||||
{
|
||||
"name": "@angular/compiler",
|
||||
"version": "0.0.0-PLACEHOLDER",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"jsnext:main": "esm/index.js",
|
||||
"description": "Angular2 - compiler",
|
||||
"main": "bundles/compiler.umd.js",
|
||||
"module": "index.js",
|
||||
"typings": "index.d.ts",
|
||||
"author": "angular",
|
||||
"license": "MIT",
|
||||
|
@ -1,90 +0,0 @@
|
||||
/**
|
||||
* @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 directive_normalizer from './src/directive_normalizer';
|
||||
import * as lexer from './src/expression_parser/lexer';
|
||||
import * as parser from './src/expression_parser/parser';
|
||||
import * as metadata_resolver from './src/metadata_resolver';
|
||||
import * as html_parser from './src/ml_parser/html_parser';
|
||||
import * as interpolation_config from './src/ml_parser/interpolation_config';
|
||||
import * as ng_module_compiler from './src/ng_module_compiler';
|
||||
import * as path_util from './src/output/path_util';
|
||||
import * as ts_emitter from './src/output/ts_emitter';
|
||||
import * as parse_util from './src/parse_util';
|
||||
import * as dom_element_schema_registry from './src/schema/dom_element_schema_registry';
|
||||
import * as selector from './src/selector';
|
||||
import * as style_compiler from './src/style_compiler';
|
||||
import * as template_parser from './src/template_parser/template_parser';
|
||||
import * as view_compiler from './src/view_compiler/view_compiler';
|
||||
|
||||
export namespace __compiler_private__ {
|
||||
export type SelectorMatcher = selector.SelectorMatcher;
|
||||
export var SelectorMatcher = selector.SelectorMatcher;
|
||||
|
||||
export type CssSelector = selector.CssSelector;
|
||||
export var CssSelector = selector.CssSelector;
|
||||
|
||||
export type AssetUrl = path_util.AssetUrl;
|
||||
export var AssetUrl = path_util.AssetUrl;
|
||||
|
||||
export type ImportGenerator = path_util.ImportGenerator;
|
||||
export var ImportGenerator = path_util.ImportGenerator;
|
||||
|
||||
export type CompileMetadataResolver = metadata_resolver.CompileMetadataResolver;
|
||||
export var CompileMetadataResolver = metadata_resolver.CompileMetadataResolver;
|
||||
|
||||
export type HtmlParser = html_parser.HtmlParser;
|
||||
export var HtmlParser = html_parser.HtmlParser;
|
||||
|
||||
export type InterpolationConfig = interpolation_config.InterpolationConfig;
|
||||
export var InterpolationConfig = interpolation_config.InterpolationConfig;
|
||||
|
||||
export type DirectiveNormalizer = directive_normalizer.DirectiveNormalizer;
|
||||
export var DirectiveNormalizer = directive_normalizer.DirectiveNormalizer;
|
||||
|
||||
export type Lexer = lexer.Lexer;
|
||||
export var Lexer = lexer.Lexer;
|
||||
|
||||
export type Parser = parser.Parser;
|
||||
export var Parser = parser.Parser;
|
||||
|
||||
export type ParseLocation = parse_util.ParseLocation;
|
||||
export var ParseLocation = parse_util.ParseLocation;
|
||||
|
||||
export type ParseError = parse_util.ParseError;
|
||||
export var ParseError = parse_util.ParseError;
|
||||
|
||||
export type ParseErrorLevel = parse_util.ParseErrorLevel;
|
||||
export var ParseErrorLevel = parse_util.ParseErrorLevel;
|
||||
|
||||
export type ParseSourceFile = parse_util.ParseSourceFile;
|
||||
export var ParseSourceFile = parse_util.ParseSourceFile;
|
||||
|
||||
export type ParseSourceSpan = parse_util.ParseSourceSpan;
|
||||
export var ParseSourceSpan = parse_util.ParseSourceSpan;
|
||||
|
||||
export type TemplateParser = template_parser.TemplateParser;
|
||||
export var TemplateParser = template_parser.TemplateParser;
|
||||
|
||||
export type TemplateParseResult = template_parser.TemplateParseResult;
|
||||
|
||||
export type DomElementSchemaRegistry = dom_element_schema_registry.DomElementSchemaRegistry;
|
||||
export var DomElementSchemaRegistry = dom_element_schema_registry.DomElementSchemaRegistry;
|
||||
|
||||
export type StyleCompiler = style_compiler.StyleCompiler;
|
||||
export var StyleCompiler = style_compiler.StyleCompiler;
|
||||
|
||||
export type ViewCompiler = view_compiler.ViewCompiler;
|
||||
export var ViewCompiler = view_compiler.ViewCompiler;
|
||||
|
||||
export type NgModuleCompiler = ng_module_compiler.NgModuleCompiler;
|
||||
export var NgModuleCompiler = ng_module_compiler.NgModuleCompiler;
|
||||
|
||||
export type TypeScriptEmitter = ts_emitter.TypeScriptEmitter;
|
||||
export var TypeScriptEmitter = ts_emitter.TypeScriptEmitter;
|
||||
}
|
16
modules/@angular/compiler/rollup-testing.config.js
Normal file
16
modules/@angular/compiler/rollup-testing.config.js
Normal file
@ -0,0 +1,16 @@
|
||||
|
||||
export default {
|
||||
entry: '../../../dist/packages-dist/compiler/testing/index.js',
|
||||
dest: '../../../dist/packages-dist/compiler/bundles/compiler-testing.umd.js',
|
||||
format: 'umd',
|
||||
moduleName: 'ng.compiler.testing',
|
||||
globals: {
|
||||
'@angular/core': 'ng.core',
|
||||
'@angular/core/testing': 'ng.core.testing',
|
||||
'@angular/compiler': 'ng.compiler',
|
||||
'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'
|
||||
}
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
|
||||
export default {
|
||||
entry: '../../../dist/packages-dist/compiler/esm/index.js',
|
||||
dest: '../../../dist/packages-dist/compiler/esm/compiler.umd.js',
|
||||
entry: '../../../dist/packages-dist/compiler/index.js',
|
||||
dest: '../../../dist/packages-dist/compiler/bundles/compiler.umd.js',
|
||||
format: 'umd',
|
||||
moduleName: 'ng.compiler',
|
||||
globals: {
|
||||
|
@ -6,12 +6,12 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {ANY_STATE, AnimationOutput, DEFAULT_STATE, EMPTY_STATE} from '../../core_private';
|
||||
import {CompileDirectiveMetadata} from '../compile_metadata';
|
||||
import {StringMapWrapper} from '../facade/collection';
|
||||
import {isBlank, isPresent} from '../facade/lang';
|
||||
import {Identifiers, resolveIdentifier} from '../identifiers';
|
||||
import * as o from '../output/output_ast';
|
||||
import {ANY_STATE, AnimationOutput, DEFAULT_STATE, EMPTY_STATE} from '../private_import_core';
|
||||
import * as t from '../template_parser/template_ast';
|
||||
|
||||
import {AnimationAst, AnimationAstVisitor, AnimationEntryAst, AnimationGroupAst, AnimationKeyframeAst, AnimationSequenceAst, AnimationStateAst, AnimationStateDeclarationAst, AnimationStateTransitionAst, AnimationStepAst, AnimationStylesAst} from './animation_ast';
|
||||
|
@ -6,13 +6,13 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {ANY_STATE, AnimationOutput, FILL_STYLE_FLAG} from '../../core_private';
|
||||
import {CompileAnimationAnimateMetadata, CompileAnimationEntryMetadata, CompileAnimationGroupMetadata, CompileAnimationKeyframesSequenceMetadata, CompileAnimationMetadata, CompileAnimationSequenceMetadata, CompileAnimationStateDeclarationMetadata, CompileAnimationStateTransitionMetadata, CompileAnimationStyleMetadata, CompileAnimationWithStepsMetadata} from '../compile_metadata';
|
||||
import {ListWrapper, StringMapWrapper} from '../facade/collection';
|
||||
import {NumberWrapper, isArray, isBlank, isPresent, isString, isStringMap} from '../facade/lang';
|
||||
import {Math} from '../facade/math';
|
||||
import {ParseError} from '../parse_util';
|
||||
|
||||
import {ANY_STATE, AnimationOutput, FILL_STYLE_FLAG} from '../private_import_core';
|
||||
import {AnimationAst, AnimationEntryAst, AnimationGroupAst, AnimationKeyframeAst, AnimationSequenceAst, AnimationStateDeclarationAst, AnimationStateTransitionAst, AnimationStateTransitionExpression, AnimationStepAst, AnimationStylesAst, AnimationWithStepsAst} from './animation_ast';
|
||||
import {StylesCollection} from './styles_collection';
|
||||
|
||||
|
@ -8,10 +8,9 @@
|
||||
|
||||
import {ChangeDetectionStrategy, SchemaMetadata, Type, ViewEncapsulation} from '@angular/core';
|
||||
|
||||
import {LifecycleHooks, reflector} from '../core_private';
|
||||
|
||||
import {ListWrapper, MapWrapper, StringMapWrapper} from './facade/collection';
|
||||
import {isBlank, isPresent, isStringMap, normalizeBlank, normalizeBool} from './facade/lang';
|
||||
import {LifecycleHooks, reflector} from './private_import_core';
|
||||
import {CssSelector} from './selector';
|
||||
import {getUrlScheme} from './url_resolver';
|
||||
import {sanitizeIdentifier, splitAtColon} from './util';
|
||||
|
@ -38,7 +38,7 @@ import {Lexer} from './expression_parser/lexer';
|
||||
import {DirectiveResolver} from './directive_resolver';
|
||||
import {PipeResolver} from './pipe_resolver';
|
||||
import {NgModuleResolver} from './ng_module_resolver';
|
||||
import {Console, Reflector, reflector, ReflectorReader, ReflectionCapabilities} from '../core_private';
|
||||
import {Console, Reflector, reflector, ReflectorReader, ReflectionCapabilities} from './private_import_core';
|
||||
import {ResourceLoader} from './resource_loader';
|
||||
import * as i18n from './i18n/index';
|
||||
|
||||
@ -61,9 +61,9 @@ export const COMPILER_PROVIDERS: Array<any|Type<any>|{[k: string]: any}|any[]> =
|
||||
Parser,
|
||||
HtmlParser,
|
||||
{
|
||||
provide: i18n.HtmlParser,
|
||||
provide: i18n.I18NHtmlParser,
|
||||
useFactory: (parser: HtmlParser, translations: string, format: string) =>
|
||||
new i18n.HtmlParser(parser, translations, format),
|
||||
new i18n.I18NHtmlParser(parser, translations, format),
|
||||
deps: [
|
||||
HtmlParser,
|
||||
[new OptionalMetadata(), new Inject(TRANSLATIONS)],
|
||||
|
@ -7,9 +7,10 @@
|
||||
*/
|
||||
|
||||
import {ComponentMetadata, DirectiveMetadata, HostBindingMetadata, HostListenerMetadata, Injectable, InputMetadata, OutputMetadata, QueryMetadata, Type, resolveForwardRef} from '@angular/core';
|
||||
import {ReflectorReader, reflector} from '../core_private';
|
||||
|
||||
import {StringMapWrapper} from './facade/collection';
|
||||
import {isPresent, stringify} from './facade/lang';
|
||||
import {ReflectorReader, reflector} from './private_import_core';
|
||||
import {splitAtColon} from './util';
|
||||
|
||||
function _isDirectiveMetadata(type: any): type is DirectiveMetadata {
|
||||
|
@ -6,7 +6,7 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {HtmlParser as BaseHtmlParser} from '../ml_parser/html_parser';
|
||||
import {HtmlParser} from '../ml_parser/html_parser';
|
||||
import {DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig} from '../ml_parser/interpolation_config';
|
||||
import {ParseTreeResult} from '../ml_parser/parser';
|
||||
|
||||
@ -18,7 +18,7 @@ import {Xmb} from './serializers/xmb';
|
||||
import {Xtb} from './serializers/xtb';
|
||||
import {TranslationBundle} from './translation_bundle';
|
||||
|
||||
export class HtmlParser implements BaseHtmlParser {
|
||||
export class I18NHtmlParser implements HtmlParser {
|
||||
// @override
|
||||
getTagDefinition: any;
|
||||
|
||||
@ -26,7 +26,7 @@ export class HtmlParser implements BaseHtmlParser {
|
||||
// interpolationConfig)
|
||||
// TODO(vicb): remove the interpolationConfig from the Xtb serializer
|
||||
constructor(
|
||||
private _htmlParser: BaseHtmlParser, private _translations?: string,
|
||||
private _htmlParser: HtmlParser, private _translations?: string,
|
||||
private _translationsFormat?: string) {}
|
||||
|
||||
parse(
|
||||
@ -69,4 +69,4 @@ export class HtmlParser implements BaseHtmlParser {
|
||||
return new Xliff(this._htmlParser, interpolationConfig);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -6,7 +6,7 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
export {HtmlParser} from './html_parser';
|
||||
export {I18NHtmlParser} from './i18n_html_parser';
|
||||
export {MessageBundle} from './message_bundle';
|
||||
export {Serializer} from './serializers/serializer';
|
||||
export {Xliff} from './serializers/xliff';
|
||||
|
@ -8,9 +8,8 @@
|
||||
|
||||
import {ANALYZE_FOR_ENTRY_COMPONENTS, ChangeDetectionStrategy, ChangeDetectorRef, ComponentFactory, ComponentFactoryResolver, ElementRef, Injector, LOCALE_ID as LOCALE_ID_, NgModuleFactory, QueryList, RenderComponentType, Renderer, SecurityContext, SimpleChange, TRANSLATIONS_FORMAT as TRANSLATIONS_FORMAT_, TemplateRef, ViewContainerRef, ViewEncapsulation} from '@angular/core';
|
||||
|
||||
import {AnimationGroupPlayer, AnimationKeyframe, AnimationOutput, AnimationSequencePlayer, AnimationStyles, AppElement, AppView, ChangeDetectorStatus, CodegenComponentFactoryResolver, DebugAppView, DebugContext, EMPTY_ARRAY, EMPTY_MAP, NgModuleInjector, NoOpAnimationPlayer, StaticNodeDebugInfo, TemplateRef_, UNINITIALIZED, ValueUnwrapper, ViewType, ViewUtils, balanceAnimationKeyframes, castByValue, checkBinding, clearStyles, collectAndResolveStyles, devModeEqual, flattenNestedViewRenderNodes, interpolate, prepareFinalAnimationStyles, pureProxy1, pureProxy10, pureProxy2, pureProxy3, pureProxy4, pureProxy5, pureProxy6, pureProxy7, pureProxy8, pureProxy9, reflector, renderStyles} from '../core_private';
|
||||
|
||||
import {CompileIdentifierMetadata, CompileTokenMetadata} from './compile_metadata';
|
||||
import {AnimationGroupPlayer, AnimationKeyframe, AnimationOutput, AnimationSequencePlayer, AnimationStyles, AppElement, AppView, ChangeDetectorStatus, CodegenComponentFactoryResolver, DebugAppView, DebugContext, EMPTY_ARRAY, EMPTY_MAP, NgModuleInjector, NoOpAnimationPlayer, StaticNodeDebugInfo, TemplateRef_, UNINITIALIZED, ValueUnwrapper, ViewType, ViewUtils, balanceAnimationKeyframes, castByValue, checkBinding, clearStyles, collectAndResolveStyles, devModeEqual, flattenNestedViewRenderNodes, interpolate, prepareFinalAnimationStyles, pureProxy1, pureProxy10, pureProxy2, pureProxy3, pureProxy4, pureProxy5, pureProxy6, pureProxy7, pureProxy8, pureProxy9, reflector, renderStyles} from './private_import_core';
|
||||
import {assetUrl} from './util';
|
||||
|
||||
var APP_VIEW_MODULE_URL = assetUrl('core', 'linker/view');
|
||||
@ -291,4 +290,4 @@ export function resolveEnumIdentifier(
|
||||
const resolvedEnum = reflector.resolveEnum(enumType.reference, name);
|
||||
return new CompileIdentifierMetadata(
|
||||
{name: `${enumType.name}.${name}`, moduleUrl: enumType.moduleUrl, reference: resolvedEnum});
|
||||
}
|
||||
}
|
||||
|
20
modules/@angular/compiler/src/index.ts
Normal file
20
modules/@angular/compiler/src/index.ts
Normal file
@ -0,0 +1,20 @@
|
||||
/**
|
||||
* @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
|
||||
* Starting point to import all compiler APIs.
|
||||
*/
|
||||
|
||||
export {COMPILER_PROVIDERS, CompileDiDependencyMetadata, CompileDirectiveMetadata, CompileFactoryMetadata, CompileIdentifierMetadata, CompileMetadataWithIdentifier, CompilePipeMetadata, CompileProviderMetadata, CompileQueryMetadata, CompileTemplateMetadata, CompileTokenMetadata, CompileTypeMetadata, CompilerConfig, DEFAULT_PACKAGE_URL_PROVIDER, DirectiveResolver, NgModuleResolver, OfflineCompiler, PipeResolver, RenderTypes, ResourceLoader, RuntimeCompiler, SourceModule, TEMPLATE_TRANSFORMS, UrlResolver, createOfflineCompileUrlResolver, platformCoreDynamic} from './compiler';
|
||||
export {DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig} from './ml_parser/interpolation_config';
|
||||
export {ElementSchemaRegistry} from './schema/element_schema_registry';
|
||||
export * from './i18n/index';
|
||||
export * from './template_parser/template_ast';
|
||||
export * from './private_export';
|
@ -8,9 +8,8 @@
|
||||
|
||||
import {AfterContentChecked, AfterContentInit, AfterViewChecked, AfterViewInit, DoCheck, OnChanges, OnDestroy, OnInit, Type} from '@angular/core';
|
||||
|
||||
import {LifecycleHooks, reflector} from '../core_private';
|
||||
|
||||
import {MapWrapper} from './facade/collection';
|
||||
import {LifecycleHooks, reflector} from './private_import_core';
|
||||
|
||||
const LIFECYCLE_INTERFACES: Map<any, Type<any>> = MapWrapper.createFromPairs([
|
||||
[LifecycleHooks.OnInit, OnInit],
|
||||
|
@ -8,7 +8,6 @@
|
||||
|
||||
import {AnimationAnimateMetadata, AnimationEntryMetadata, AnimationGroupMetadata, AnimationKeyframesSequenceMetadata, AnimationMetadata, AnimationStateDeclarationMetadata, AnimationStateMetadata, AnimationStateTransitionMetadata, AnimationStyleMetadata, AnimationWithStepsMetadata, AttributeMetadata, ChangeDetectionStrategy, ComponentMetadata, HostMetadata, InjectMetadata, Injectable, ModuleWithProviders, OptionalMetadata, Provider, QueryMetadata, SchemaMetadata, SelfMetadata, SkipSelfMetadata, Type, ViewQueryMetadata, resolveForwardRef} from '@angular/core';
|
||||
|
||||
import {LIFECYCLE_HOOKS_VALUES, ReflectorReader, reflector} from '../core_private';
|
||||
import {StringMapWrapper} from '../src/facade/collection';
|
||||
|
||||
import {assertArrayOfStrings, assertInterpolationSymbols} from './assertions';
|
||||
@ -19,6 +18,7 @@ import {Identifiers, resolveIdentifierToken} from './identifiers';
|
||||
import {hasLifecycleHook} from './lifecycle_reflector';
|
||||
import {NgModuleResolver} from './ng_module_resolver';
|
||||
import {PipeResolver} from './pipe_resolver';
|
||||
import {LIFECYCLE_HOOKS_VALUES, ReflectorReader, reflector} from './private_import_core';
|
||||
import {ElementSchemaRegistry} from './schema/element_schema_registry';
|
||||
import {getUrlScheme} from './url_resolver';
|
||||
import {MODULE_SUFFIX, ValueTransformer, sanitizeIdentifier, visitValue} from './util';
|
||||
|
@ -8,14 +8,13 @@
|
||||
|
||||
import {Injectable} from '@angular/core';
|
||||
|
||||
import {LifecycleHooks} from '../core_private';
|
||||
|
||||
import {CompileDiDependencyMetadata, CompileIdentifierMetadata, CompileNgModuleMetadata, CompileProviderMetadata, CompileTokenMetadata} from './compile_metadata';
|
||||
import {isBlank, isPresent} from './facade/lang';
|
||||
import {Identifiers, identifierToken, resolveIdentifier, resolveIdentifierToken} from './identifiers';
|
||||
import * as o from './output/output_ast';
|
||||
import {convertValueToOutputAst} from './output/value_util';
|
||||
import {ParseLocation, ParseSourceFile, ParseSourceSpan} from './parse_util';
|
||||
import {LifecycleHooks} from './private_import_core';
|
||||
import {NgModuleProviderAnalyzer} from './provider_analyzer';
|
||||
import {ProviderAst} from './template_parser/template_ast';
|
||||
import {createDiTokenExpression} from './util';
|
||||
|
@ -8,8 +8,8 @@
|
||||
|
||||
import {Injectable, NgModuleMetadata, Type} from '@angular/core';
|
||||
|
||||
import {ReflectorReader, reflector} from '../core_private';
|
||||
import {isPresent, stringify} from './facade/lang';
|
||||
import {ReflectorReader, reflector} from './private_import_core';
|
||||
|
||||
function _isNgModuleMetadata(obj: any): obj is NgModuleMetadata {
|
||||
return obj instanceof NgModuleMetadata;
|
||||
|
@ -8,9 +8,8 @@
|
||||
|
||||
import {Injectable, PipeMetadata, Type, resolveForwardRef} from '@angular/core';
|
||||
|
||||
import {ReflectorReader, reflector} from '../core_private';
|
||||
|
||||
import {isPresent, stringify} from './facade/lang';
|
||||
import {ReflectorReader, reflector} from './private_import_core';
|
||||
|
||||
function _isPipeMetadata(type: any): boolean {
|
||||
return type instanceof PipeMetadata;
|
||||
|
112
modules/@angular/compiler/src/private_export.ts
Normal file
112
modules/@angular/compiler/src/private_export.ts
Normal file
@ -0,0 +1,112 @@
|
||||
/**
|
||||
* @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 directive_normalizer from './directive_normalizer';
|
||||
import * as lexer from './expression_parser/lexer';
|
||||
import * as parser from './expression_parser/parser';
|
||||
import * as metadata_resolver from './metadata_resolver';
|
||||
import * as html_parser from './ml_parser/html_parser';
|
||||
import * as interpolation_config from './ml_parser/interpolation_config';
|
||||
import * as ng_module_compiler from './ng_module_compiler';
|
||||
import * as path_util from './output/path_util';
|
||||
import * as ts_emitter from './output/ts_emitter';
|
||||
import * as parse_util from './parse_util';
|
||||
import * as dom_element_schema_registry from './schema/dom_element_schema_registry';
|
||||
import * as selector from './selector';
|
||||
import * as style_compiler from './style_compiler';
|
||||
import * as template_parser from './template_parser/template_parser';
|
||||
import * as view_compiler from './view_compiler/view_compiler';
|
||||
|
||||
export const __compiler_private__: {
|
||||
_SelectorMatcher?: selector.SelectorMatcher; SelectorMatcher: typeof selector.SelectorMatcher;
|
||||
|
||||
_CssSelector?: selector.CssSelector;
|
||||
CssSelector: typeof selector.CssSelector;
|
||||
|
||||
_AssetUrl?: path_util.AssetUrl;
|
||||
AssetUrl: typeof path_util.AssetUrl;
|
||||
|
||||
_ImportGenerator?: path_util.ImportGenerator;
|
||||
ImportGenerator: typeof path_util.ImportGenerator;
|
||||
|
||||
_CompileMetadataResolver?: metadata_resolver.CompileMetadataResolver;
|
||||
CompileMetadataResolver: typeof metadata_resolver.CompileMetadataResolver;
|
||||
|
||||
_HtmlParser?: html_parser.HtmlParser;
|
||||
HtmlParser: typeof html_parser.HtmlParser;
|
||||
|
||||
_InterpolationConfig?: interpolation_config.InterpolationConfig;
|
||||
InterpolationConfig: typeof interpolation_config.InterpolationConfig;
|
||||
|
||||
_DirectiveNormalizer?: directive_normalizer.DirectiveNormalizer;
|
||||
DirectiveNormalizer: typeof directive_normalizer.DirectiveNormalizer;
|
||||
|
||||
_Lexer?: lexer.Lexer;
|
||||
Lexer: typeof lexer.Lexer;
|
||||
|
||||
_Parser?: parser.Parser;
|
||||
Parser: typeof parser.Parser;
|
||||
|
||||
_ParseLocation?: parse_util.ParseLocation;
|
||||
ParseLocation: typeof parse_util.ParseLocation;
|
||||
|
||||
_ParseError?: parse_util.ParseError;
|
||||
ParseError: typeof parse_util.ParseError;
|
||||
|
||||
_ParseErrorLevel?: parse_util.ParseErrorLevel;
|
||||
ParseErrorLevel: typeof parse_util.ParseErrorLevel;
|
||||
|
||||
_ParseSourceFile?: parse_util.ParseSourceFile;
|
||||
ParseSourceFile: typeof parse_util.ParseSourceFile;
|
||||
|
||||
_ParseSourceSpan?: parse_util.ParseSourceSpan;
|
||||
ParseSourceSpan: typeof parse_util.ParseSourceSpan;
|
||||
|
||||
_TemplateParser?: template_parser.TemplateParser;
|
||||
TemplateParser: typeof template_parser.TemplateParser;
|
||||
|
||||
_TemplateParseResult?: template_parser.TemplateParseResult;
|
||||
|
||||
_DomElementSchemaRegistry?: dom_element_schema_registry.DomElementSchemaRegistry;
|
||||
DomElementSchemaRegistry: typeof dom_element_schema_registry.DomElementSchemaRegistry;
|
||||
|
||||
_StyleCompiler?: style_compiler.StyleCompiler;
|
||||
StyleCompiler: typeof style_compiler.StyleCompiler;
|
||||
|
||||
_ViewCompiler?: view_compiler.ViewCompiler;
|
||||
ViewCompiler: typeof view_compiler.ViewCompiler;
|
||||
|
||||
_NgModuleCompiler?: ng_module_compiler.NgModuleCompiler;
|
||||
NgModuleCompiler: typeof ng_module_compiler.NgModuleCompiler;
|
||||
|
||||
_TypeScriptEmitter?: ts_emitter.TypeScriptEmitter;
|
||||
TypeScriptEmitter: typeof ts_emitter.TypeScriptEmitter;
|
||||
|
||||
} = {
|
||||
SelectorMatcher: selector.SelectorMatcher,
|
||||
CssSelector: selector.CssSelector,
|
||||
AssetUrl: path_util.AssetUrl,
|
||||
ImportGenerator: path_util.ImportGenerator,
|
||||
CompileMetadataResolver: metadata_resolver.CompileMetadataResolver,
|
||||
HtmlParser: html_parser.HtmlParser,
|
||||
InterpolationConfig: interpolation_config.InterpolationConfig,
|
||||
DirectiveNormalizer: directive_normalizer.DirectiveNormalizer,
|
||||
Lexer: lexer.Lexer,
|
||||
Parser: parser.Parser,
|
||||
ParseLocation: parse_util.ParseLocation,
|
||||
ParseError: parse_util.ParseError,
|
||||
ParseErrorLevel: parse_util.ParseErrorLevel,
|
||||
ParseSourceFile: parse_util.ParseSourceFile,
|
||||
ParseSourceSpan: parse_util.ParseSourceSpan,
|
||||
TemplateParser: template_parser.TemplateParser,
|
||||
DomElementSchemaRegistry: dom_element_schema_registry.DomElementSchemaRegistry,
|
||||
StyleCompiler: style_compiler.StyleCompiler,
|
||||
ViewCompiler: view_compiler.ViewCompiler,
|
||||
NgModuleCompiler: ng_module_compiler.NgModuleCompiler,
|
||||
TypeScriptEmitter: ts_emitter.TypeScriptEmitter
|
||||
};
|
94
modules/@angular/compiler/src/private_import_core.ts
Normal file
94
modules/@angular/compiler/src/private_import_core.ts
Normal file
@ -0,0 +1,94 @@
|
||||
/**
|
||||
* @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 const isDefaultChangeDetectionStrategy: typeof r.isDefaultChangeDetectionStrategy =
|
||||
r.isDefaultChangeDetectionStrategy;
|
||||
export type ChangeDetectorStatus = typeof r._ChangeDetectorStatus;
|
||||
export const ChangeDetectorStatus: typeof r.ChangeDetectorStatus = r.ChangeDetectorStatus;
|
||||
r.CHANGE_DETECTION_STRATEGY_VALUES;
|
||||
export type LifecycleHooks = typeof r._LifecycleHooks;
|
||||
export const LifecycleHooks: typeof r.LifecycleHooks = r.LifecycleHooks;
|
||||
export const LIFECYCLE_HOOKS_VALUES: typeof r.LIFECYCLE_HOOKS_VALUES = r.LIFECYCLE_HOOKS_VALUES;
|
||||
export type ReflectorReader = typeof r._ReflectorReader;
|
||||
export const ReflectorReader: typeof r.ReflectorReader = r.ReflectorReader;
|
||||
export type AppElement = typeof r._AppElement;
|
||||
export const AppElement: typeof r.AppElement = r.AppElement;
|
||||
export const CodegenComponentFactoryResolver: typeof r.CodegenComponentFactoryResolver =
|
||||
r.CodegenComponentFactoryResolver;
|
||||
export const AppView: typeof r.AppView = r.AppView;
|
||||
export const DebugAppView: typeof r.DebugAppView = r.DebugAppView;
|
||||
export const NgModuleInjector: typeof r.NgModuleInjector = r.NgModuleInjector;
|
||||
export type ViewType = typeof r._ViewType;
|
||||
export const ViewType: typeof r.ViewType = r.ViewType;
|
||||
export const MAX_INTERPOLATION_VALUES: typeof r.MAX_INTERPOLATION_VALUES =
|
||||
r.MAX_INTERPOLATION_VALUES;
|
||||
export const checkBinding: typeof r.checkBinding = r.checkBinding;
|
||||
export const flattenNestedViewRenderNodes: typeof r.flattenNestedViewRenderNodes =
|
||||
r.flattenNestedViewRenderNodes;
|
||||
export const interpolate: typeof r.interpolate = r.interpolate;
|
||||
export const ViewUtils: typeof r.ViewUtils = r.ViewUtils;
|
||||
export const DebugContext: typeof r.DebugContext = r.DebugContext;
|
||||
export const StaticNodeDebugInfo: typeof r.StaticNodeDebugInfo = r.StaticNodeDebugInfo;
|
||||
export const devModeEqual: typeof r.devModeEqual = r.devModeEqual;
|
||||
export const UNINITIALIZED: typeof r.UNINITIALIZED = r.UNINITIALIZED;
|
||||
export const ValueUnwrapper: typeof r.ValueUnwrapper = r.ValueUnwrapper;
|
||||
export const TemplateRef_: typeof r.TemplateRef_ = r.TemplateRef_;
|
||||
export type RenderDebugInfo = typeof r._RenderDebugInfo;
|
||||
export const RenderDebugInfo: typeof r.RenderDebugInfo = r.RenderDebugInfo;
|
||||
export const EMPTY_ARRAY: typeof r.EMPTY_ARRAY = r.EMPTY_ARRAY;
|
||||
export const EMPTY_MAP: typeof r.EMPTY_MAP = r.EMPTY_MAP;
|
||||
export const pureProxy1: typeof r.pureProxy1 = r.pureProxy1;
|
||||
export const pureProxy2: typeof r.pureProxy2 = r.pureProxy2;
|
||||
export const pureProxy3: typeof r.pureProxy3 = r.pureProxy3;
|
||||
export const pureProxy4: typeof r.pureProxy4 = r.pureProxy4;
|
||||
export const pureProxy5: typeof r.pureProxy5 = r.pureProxy5;
|
||||
export const pureProxy6: typeof r.pureProxy6 = r.pureProxy6;
|
||||
export const pureProxy7: typeof r.pureProxy7 = r.pureProxy7;
|
||||
export const pureProxy8: typeof r.pureProxy8 = r.pureProxy8;
|
||||
export const pureProxy9: typeof r.pureProxy9 = r.pureProxy9;
|
||||
export const pureProxy10: typeof r.pureProxy10 = r.pureProxy10;
|
||||
export const castByValue: typeof r.castByValue = r.castByValue;
|
||||
export type Console = typeof r._Console;
|
||||
export const Console: typeof r.Console = r.Console;
|
||||
export const reflector: typeof r.reflector = r.reflector;
|
||||
export const Reflector: typeof r.Reflector = r.Reflector;
|
||||
export type Reflector = typeof r._Reflector;
|
||||
export type ReflectionCapabilities = typeof r._ReflectionCapabilities;
|
||||
export const ReflectionCapabilities: typeof r.ReflectionCapabilities = r.ReflectionCapabilities;
|
||||
export type NoOpAnimationPlayer = typeof r._NoOpAnimationPlayer;
|
||||
export const NoOpAnimationPlayer: typeof r.NoOpAnimationPlayer = r.NoOpAnimationPlayer;
|
||||
export type AnimationPlayer = typeof r._AnimationPlayer;
|
||||
export const AnimationPlayer: typeof r.AnimationPlayer = r.AnimationPlayer;
|
||||
export type AnimationSequencePlayer = typeof r._AnimationSequencePlayer;
|
||||
export const AnimationSequencePlayer: typeof r.AnimationSequencePlayer = r.AnimationSequencePlayer;
|
||||
export type AnimationGroupPlayer = typeof r._AnimationGroupPlayer;
|
||||
export const AnimationGroupPlayer: typeof r.AnimationGroupPlayer = r.AnimationGroupPlayer;
|
||||
export type AnimationKeyframe = typeof r._AnimationKeyframe;
|
||||
export const AnimationKeyframe: typeof r.AnimationKeyframe = r.AnimationKeyframe;
|
||||
export type AnimationStyles = typeof r._AnimationStyles;
|
||||
export const AnimationStyles: typeof r.AnimationStyles = r.AnimationStyles;
|
||||
export type AnimationOutput = typeof r._AnimationOutput;
|
||||
export const AnimationOutput: typeof r.AnimationOutput = r.AnimationOutput;
|
||||
export const ANY_STATE = r.ANY_STATE;
|
||||
export const DEFAULT_STATE = r.DEFAULT_STATE;
|
||||
export const EMPTY_STATE = r.EMPTY_STATE;
|
||||
export const FILL_STYLE_FLAG = r.FILL_STYLE_FLAG;
|
||||
export const prepareFinalAnimationStyles: typeof r.prepareFinalAnimationStyles =
|
||||
r.prepareFinalAnimationStyles;
|
||||
export const balanceAnimationKeyframes: typeof r.balanceAnimationKeyframes =
|
||||
r.balanceAnimationKeyframes;
|
||||
export const clearStyles: typeof r.clearStyles = r.clearStyles;
|
||||
export const collectAndResolveStyles: typeof r.collectAndResolveStyles = r.collectAndResolveStyles;
|
||||
export const renderStyles: typeof r.renderStyles = r.renderStyles;
|
||||
export type ViewMetadata = typeof r._ViewMetadata;
|
||||
export const ViewMetadata: typeof r.ViewMetadata = r.ViewMetadata;
|
||||
export type ComponentStillLoadingError = typeof r._ComponentStillLoadingError;
|
||||
export const ComponentStillLoadingError: typeof r.ComponentStillLoadingError =
|
||||
r.ComponentStillLoadingError;
|
@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
import {Compiler, ComponentFactory, Injectable, Injector, ModuleWithComponentFactories, NgModuleFactory, OptionalMetadata, Provider, SchemaMetadata, SkipSelfMetadata, Type} from '@angular/core';
|
||||
import {ComponentStillLoadingError} from '../core_private';
|
||||
|
||||
import {CompileDirectiveMetadata, CompileIdentifierMetadata, CompileNgModuleMetadata, CompilePipeMetadata, ProviderMeta, createHostComponentMeta} from './compile_metadata';
|
||||
import {CompilerConfig} from './config';
|
||||
import {DirectiveNormalizer} from './directive_normalizer';
|
||||
@ -17,6 +17,7 @@ import {NgModuleCompiler} from './ng_module_compiler';
|
||||
import * as ir from './output/output_ast';
|
||||
import {interpretStatements} from './output/output_interpreter';
|
||||
import {jitStatements} from './output/output_jit';
|
||||
import {ComponentStillLoadingError} from './private_import_core';
|
||||
import {CompiledStylesheet, StyleCompiler} from './style_compiler';
|
||||
import {TemplateParser} from './template_parser/template_parser';
|
||||
import {SyncAsyncResult} from './util';
|
||||
|
@ -8,12 +8,14 @@
|
||||
|
||||
import {SecurityContext} from '@angular/core';
|
||||
|
||||
import {LifecycleHooks} from '../../core_private';
|
||||
import {CompileDirectiveMetadata, CompileProviderMetadata, CompileTokenMetadata} from '../compile_metadata';
|
||||
import {AST} from '../expression_parser/ast';
|
||||
import {isPresent} from '../facade/lang';
|
||||
import {ParseSourceSpan} from '../parse_util';
|
||||
|
||||
import {LifecycleHooks} from '../private_import_core';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* An Abstract Syntax Tree node representing part of a parsed Angular template.
|
||||
|
@ -8,13 +8,12 @@
|
||||
|
||||
import {Inject, Injectable, OpaqueToken, Optional, SchemaMetadata, SecurityContext} from '@angular/core';
|
||||
|
||||
import {Console, MAX_INTERPOLATION_VALUES} from '../../core_private';
|
||||
import {CompileDirectiveMetadata, CompilePipeMetadata, CompileTokenMetadata, removeIdentifierDuplicates} from '../compile_metadata';
|
||||
import {AST, ASTWithSource, BindingPipe, EmptyExpr, Interpolation, ParserError, RecursiveAstVisitor, TemplateBinding} from '../expression_parser/ast';
|
||||
import {Parser} from '../expression_parser/parser';
|
||||
import {ListWrapper, SetWrapper, StringMapWrapper} from '../facade/collection';
|
||||
import {isBlank, isPresent, isString} from '../facade/lang';
|
||||
import {HtmlParser} from '../i18n/html_parser';
|
||||
import {I18NHtmlParser} from '../i18n/i18n_html_parser';
|
||||
import {Identifiers, identifierToken, resolveIdentifierToken} from '../identifiers';
|
||||
import * as html from '../ml_parser/ast';
|
||||
import {ParseTreeResult} from '../ml_parser/html_parser';
|
||||
@ -22,6 +21,7 @@ import {expandNodes} from '../ml_parser/icu_ast_expander';
|
||||
import {InterpolationConfig} from '../ml_parser/interpolation_config';
|
||||
import {mergeNsAndName, splitNsName} from '../ml_parser/tags';
|
||||
import {ParseError, ParseErrorLevel, ParseSourceSpan} from '../parse_util';
|
||||
import {Console, MAX_INTERPOLATION_VALUES} from '../private_import_core';
|
||||
import {ProviderElementContext, ProviderViewContext} from '../provider_analyzer';
|
||||
import {ElementSchemaRegistry} from '../schema/element_schema_registry';
|
||||
import {CssSelector, SelectorMatcher} from '../selector';
|
||||
@ -93,7 +93,7 @@ export class TemplateParseResult {
|
||||
export class TemplateParser {
|
||||
constructor(
|
||||
private _exprParser: Parser, private _schemaRegistry: ElementSchemaRegistry,
|
||||
private _htmlParser: HtmlParser, private _console: Console,
|
||||
private _htmlParser: I18NHtmlParser, private _console: Console,
|
||||
@Optional() @Inject(TEMPLATE_TRANSFORMS) public transforms: TemplateAstVisitor[]) {}
|
||||
|
||||
parse(
|
||||
|
@ -6,7 +6,6 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {ViewType} from '../../core_private';
|
||||
import {CompiledAnimationTriggerResult} from '../animation/animation_compiler';
|
||||
import {CompileDirectiveMetadata, CompileIdentifierMetadata, CompilePipeMetadata, CompileTokenMetadata} from '../compile_metadata';
|
||||
import {CompilerConfig} from '../config';
|
||||
@ -14,6 +13,7 @@ import {ListWrapper, MapWrapper} from '../facade/collection';
|
||||
import {isBlank, isPresent} from '../facade/lang';
|
||||
import {Identifiers, resolveIdentifier} from '../identifiers';
|
||||
import * as o from '../output/output_ast';
|
||||
import {ViewType} from '../private_import_core';
|
||||
import {createDiTokenExpression} from '../util';
|
||||
|
||||
import {CompileBinding} from './compile_binding';
|
||||
|
@ -8,12 +8,13 @@
|
||||
|
||||
import {ChangeDetectionStrategy, ViewEncapsulation} from '@angular/core';
|
||||
|
||||
import {ChangeDetectorStatus, ViewType} from '../../core_private';
|
||||
import {CompileIdentifierMetadata} from '../compile_metadata';
|
||||
import {isBlank} from '../facade/lang';
|
||||
import {Identifiers, resolveEnumIdentifier, resolveIdentifier} from '../identifiers';
|
||||
import * as o from '../output/output_ast';
|
||||
|
||||
import {ChangeDetectorStatus, ViewType} from '../private_import_core';
|
||||
|
||||
function _enumExpression(classIdentifier: CompileIdentifierMetadata, name: string): o.Expression {
|
||||
return o.importExpr(resolveEnumIdentifier(classIdentifier, name));
|
||||
}
|
||||
|
@ -6,12 +6,12 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {AnimationOutput} from '../../core_private';
|
||||
import {CompileDirectiveMetadata} from '../compile_metadata';
|
||||
import {ListWrapper, StringMapWrapper} from '../facade/collection';
|
||||
import {StringWrapper, isBlank, isPresent} from '../facade/lang';
|
||||
import {Identifiers, identifierToken, resolveIdentifier} from '../identifiers';
|
||||
import * as o from '../output/output_ast';
|
||||
import {AnimationOutput} from '../private_import_core';
|
||||
import {BoundEventAst, DirectiveAst} from '../template_parser/template_ast';
|
||||
|
||||
import {CompileBinding} from './compile_binding';
|
||||
|
@ -6,9 +6,9 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {LifecycleHooks} from '../../core_private';
|
||||
import {CompileDirectiveMetadata, CompilePipeMetadata} from '../compile_metadata';
|
||||
import * as o from '../output/output_ast';
|
||||
import {LifecycleHooks} from '../private_import_core';
|
||||
import {DirectiveAst, ProviderAst} from '../template_parser/template_ast';
|
||||
|
||||
import {CompileElement} from './compile_element';
|
||||
|
@ -8,11 +8,11 @@
|
||||
|
||||
import {SecurityContext} from '@angular/core';
|
||||
|
||||
import {EMPTY_STATE as EMPTY_ANIMATION_STATE, LifecycleHooks, isDefaultChangeDetectionStrategy} from '../../core_private';
|
||||
import * as cdAst from '../expression_parser/ast';
|
||||
import {isBlank, isPresent} from '../facade/lang';
|
||||
import {Identifiers, resolveIdentifier} from '../identifiers';
|
||||
import * as o from '../output/output_ast';
|
||||
import {EMPTY_STATE as EMPTY_ANIMATION_STATE, LifecycleHooks, isDefaultChangeDetectionStrategy} from '../private_import_core';
|
||||
import {BoundElementPropertyAst, BoundTextAst, DirectiveAst, PropertyBindingType} from '../template_parser/template_ast';
|
||||
import {camelCaseToDashCase} from '../util';
|
||||
|
||||
|
@ -5,9 +5,9 @@
|
||||
* 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 {AnimationOutput} from '../../core_private';
|
||||
import {ListWrapper} from '../facade/collection';
|
||||
import {identifierToken} from '../identifiers';
|
||||
import {AnimationOutput} from '../private_import_core';
|
||||
import {AttrAst, BoundDirectivePropertyAst, BoundElementPropertyAst, BoundEventAst, BoundTextAst, DirectiveAst, ElementAst, EmbeddedTemplateAst, NgContentAst, ReferenceAst, TemplateAst, TemplateAstVisitor, TextAst, VariableAst, templateVisitAll} from '../template_parser/template_ast';
|
||||
|
||||
import {CompileElement, CompileNode} from './compile_element';
|
||||
|
@ -8,13 +8,13 @@
|
||||
|
||||
import {ChangeDetectionStrategy, ViewEncapsulation} from '@angular/core';
|
||||
|
||||
import {ChangeDetectorStatus, ViewType, isDefaultChangeDetectionStrategy} from '../../core_private';
|
||||
import {AnimationCompiler} from '../animation/animation_compiler';
|
||||
import {CompileDirectiveMetadata, CompileIdentifierMetadata, CompileTokenMetadata, CompileTypeMetadata} from '../compile_metadata';
|
||||
import {ListWrapper, SetWrapper, StringMapWrapper} from '../facade/collection';
|
||||
import {StringWrapper, isPresent} from '../facade/lang';
|
||||
import {Identifiers, identifierToken, resolveIdentifier, resolveIdentifierToken} from '../identifiers';
|
||||
import * as o from '../output/output_ast';
|
||||
import {ChangeDetectorStatus, ViewType, isDefaultChangeDetectionStrategy} from '../private_import_core';
|
||||
import {AttrAst, BoundDirectivePropertyAst, BoundElementPropertyAst, BoundEventAst, BoundTextAst, DirectiveAst, ElementAst, EmbeddedTemplateAst, NgContentAst, ProviderAst, ReferenceAst, TemplateAst, TemplateAstVisitor, TextAst, VariableAst, templateVisitAll} from '../template_parser/template_ast';
|
||||
import {createDiTokenExpression} from '../util';
|
||||
|
||||
|
@ -10,11 +10,11 @@ import {AnimationAnimateMetadata, AnimationGroupMetadata, AnimationMetadata, Ani
|
||||
import {AsyncTestCompleter, beforeEach, beforeEachProviders, ddescribe, describe, iit, inject, it, xdescribe, xit} from '@angular/core/testing/testing_internal';
|
||||
import {expect} from '@angular/platform-browser/testing/matchers';
|
||||
|
||||
import {FILL_STYLE_FLAG, flattenStyles} from '../../core_private';
|
||||
import {AnimationAst, AnimationEntryAst, AnimationGroupAst, AnimationKeyframeAst, AnimationSequenceAst, AnimationStateTransitionAst, AnimationStepAst, AnimationStylesAst} from '../../src/animation/animation_ast';
|
||||
import {parseAnimationEntry} from '../../src/animation/animation_parser';
|
||||
import {StringMapWrapper} from '../../src/facade/collection';
|
||||
import {CompileMetadataResolver} from '../../src/metadata_resolver';
|
||||
import {FILL_STYLE_FLAG, flattenStyles} from '../private_import_core';
|
||||
|
||||
export function main() {
|
||||
describe('parseAnimationEntry', () => {
|
||||
|
@ -9,8 +9,9 @@
|
||||
import {Component, ComponentMetadata, Directive, Injector} from '@angular/core';
|
||||
import {TestBed, inject} from '@angular/core/testing';
|
||||
|
||||
import {ViewMetadata} from '../core_private';
|
||||
import {MockDirectiveResolver} from '../testing';
|
||||
import {MockDirectiveResolver} from '../testing/index';
|
||||
|
||||
import {ViewMetadata} from './private_import_core';
|
||||
|
||||
export function main() {
|
||||
describe('MockDirectiveResolver', () => {
|
||||
|
@ -20,8 +20,13 @@ class ASTValidator extends RecursiveAstVisitor {
|
||||
|
||||
validate(ast: AST, cb: () => void): void {
|
||||
if (!inSpan(ast.span, this.parentSpan)) {
|
||||
throw Error(
|
||||
`Invalid AST span [expected (${ast.span.start}, ${ast.span.end}) to be in (${this.parentSpan.start}, ${this.parentSpan.end}) for ${unparse(ast)}`);
|
||||
if (this.parentSpan) {
|
||||
let parentSpan = this.parentSpan as ParseSpan;
|
||||
throw Error(
|
||||
`Invalid AST span [expected (${ast.span.start}, ${ast.span.end}) to be in (${parentSpan.start}, ${parentSpan.end}) for ${unparse(ast)}`);
|
||||
} else {
|
||||
throw Error(`Invalid root AST span for ${unparse(ast)}`);
|
||||
}
|
||||
}
|
||||
const oldParent = this.parentSpan;
|
||||
this.parentSpan = ast.span;
|
||||
|
@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
import {NgLocalization} from '@angular/common';
|
||||
import {ResourceLoader, i18n} from '@angular/compiler';
|
||||
import {ResourceLoader} from '@angular/compiler';
|
||||
import {Component, DebugElement, TRANSLATIONS, TRANSLATIONS_FORMAT} from '@angular/core';
|
||||
import {TestBed, async} from '@angular/core/testing';
|
||||
import {By} from '@angular/platform-browser/src/dom/debug/by';
|
||||
|
@ -10,7 +10,7 @@ import {Injector, NgModule, NgModuleMetadata} from '@angular/core';
|
||||
import {beforeEach, ddescribe, describe, expect, iit, inject, it} from '@angular/core/testing/testing_internal';
|
||||
|
||||
import {isBlank, stringify} from '../src/facade/lang';
|
||||
import {MockNgModuleResolver} from '../testing';
|
||||
import {MockNgModuleResolver} from '../testing/index';
|
||||
|
||||
export function main() {
|
||||
describe('MockNgModuleResolver', () => {
|
||||
|
@ -10,7 +10,7 @@ import {Injector, Pipe, PipeMetadata} from '@angular/core';
|
||||
import {beforeEach, ddescribe, describe, expect, iit, inject, it} from '@angular/core/testing/testing_internal';
|
||||
|
||||
import {isBlank, stringify} from '../src/facade/lang';
|
||||
import {MockPipeResolver} from '../testing';
|
||||
import {MockPipeResolver} from '../testing/index';
|
||||
|
||||
export function main() {
|
||||
describe('MockPipeResolver', () => {
|
||||
|
15
modules/@angular/compiler/test/private_import_core.ts
Normal file
15
modules/@angular/compiler/test/private_import_core.ts
Normal file
@ -0,0 +1,15 @@
|
||||
/**
|
||||
* @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 _} from '../../core/index';
|
||||
|
||||
export type ViewMetadata = typeof _._ViewMetadata;
|
||||
export const ViewMetadata: typeof _.ViewMetadata = _.ViewMetadata;
|
||||
|
||||
export const FILL_STYLE_FLAG = _.FILL_STYLE_FLAG;
|
||||
export const flattenStyles: typeof _.flattenStyles = _.flattenStyles;
|
@ -7,15 +7,15 @@
|
||||
*/
|
||||
|
||||
import {DirectiveResolver, ResourceLoader} from '@angular/compiler';
|
||||
import {MockDirectiveResolver} from '@angular/compiler/testing';
|
||||
import {Compiler, Component, ComponentFactory, Injectable, Injector, Input, NgModule, NgModuleFactory, Type} from '@angular/core';
|
||||
import {ComponentFixture, TestBed, async, fakeAsync, getTestBed, tick} from '@angular/core/testing';
|
||||
import {beforeEach, beforeEachProviders, ddescribe, describe, iit, inject, it, xdescribe, xit} from '@angular/core/testing/testing_internal';
|
||||
import {expect} from '@angular/platform-browser/testing/matchers';
|
||||
|
||||
import {ViewMetadata} from '../core_private';
|
||||
import {stringify} from '../src/facade/lang';
|
||||
import {MockDirectiveResolver} from '../testing/index';
|
||||
|
||||
import {ViewMetadata} from './private_import_core';
|
||||
import {SpyResourceLoader} from './spies';
|
||||
|
||||
@Component({selector: 'child-cmp'})
|
||||
|
@ -11,7 +11,6 @@ import {DomElementSchemaRegistry} from '@angular/compiler/src/schema/dom_element
|
||||
import {ElementSchemaRegistry} from '@angular/compiler/src/schema/element_schema_registry';
|
||||
import {AttrAst, BoundDirectivePropertyAst, BoundElementPropertyAst, BoundEventAst, BoundTextAst, DirectiveAst, ElementAst, EmbeddedTemplateAst, NgContentAst, PropertyBindingType, ProviderAstType, ReferenceAst, TemplateAst, TemplateAstVisitor, TextAst, VariableAst, templateVisitAll} from '@angular/compiler/src/template_parser/template_ast';
|
||||
import {TEMPLATE_TRANSFORMS, TemplateParser, splitClasses} from '@angular/compiler/src/template_parser/template_parser';
|
||||
import {MockSchemaRegistry} from '@angular/compiler/testing';
|
||||
import {TEST_COMPILER_PROVIDERS} from '@angular/compiler/testing/test_bindings';
|
||||
import {SchemaMetadata, SecurityContext, Type} from '@angular/core';
|
||||
import {Console} from '@angular/core/src/console';
|
||||
@ -20,6 +19,7 @@ import {afterEach, beforeEach, beforeEachProviders, ddescribe, describe, expect,
|
||||
|
||||
import {Identifiers, identifierToken, resolveIdentifierToken} from '../../src/identifiers';
|
||||
import {DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig} from '../../src/ml_parser/interpolation_config';
|
||||
import {MockSchemaRegistry} from '../../testing/index';
|
||||
import {unparse} from '../expression_parser/unparser';
|
||||
|
||||
var someModuleUrl = 'package:someModule';
|
||||
|
@ -5,13 +5,12 @@
|
||||
* 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 {DirectiveResolver} from '@angular/compiler';
|
||||
import {AnimationEntryMetadata, Compiler, ComponentMetadata, DirectiveMetadata, Injectable, Injector, Provider, Type, resolveForwardRef} from '@angular/core';
|
||||
import {ViewMetadata} from '../core_private';
|
||||
|
||||
import {DirectiveResolver} from '../src/directive_resolver';
|
||||
import {Map} from '../src/facade/collection';
|
||||
import {isArray, isPresent} from '../src/facade/lang';
|
||||
import {Map} from './facade/collection';
|
||||
import {isArray, isPresent} from './facade/lang';
|
||||
import {ViewMetadata} from './private_import_core';
|
||||
|
||||
|
||||
|
||||
|
1
modules/@angular/compiler/testing/facade
Symbolic link
1
modules/@angular/compiler/testing/facade
Symbolic link
@ -0,0 +1 @@
|
||||
../../facade/src
|
@ -6,19 +6,34 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
export * from './testing/schema_registry_mock';
|
||||
export * from './testing/directive_resolver_mock';
|
||||
export * from './testing/ng_module_resolver_mock';
|
||||
export * from './testing/pipe_resolver_mock';
|
||||
/**
|
||||
* @module
|
||||
* @description
|
||||
* Entry point for all APIs of the compiler package.
|
||||
*
|
||||
* <div class="callout is-critical">
|
||||
* <header>Unstable APIs</header>
|
||||
* <p>
|
||||
* All compiler apis are currently considered experimental and private!
|
||||
* </p>
|
||||
* <p>
|
||||
* We expect the APIs in this package to keep on changing. Do not rely on them.
|
||||
* </p>
|
||||
* </div>
|
||||
*/
|
||||
export * from './schema_registry_mock';
|
||||
export * from './directive_resolver_mock';
|
||||
export * from './ng_module_resolver_mock';
|
||||
export * from './pipe_resolver_mock';
|
||||
|
||||
import {createPlatformFactory, ModuleWithComponentFactories, Injectable, CompilerOptions, COMPILER_OPTIONS, CompilerFactory, ComponentFactory, NgModuleFactory, Injector, NgModuleMetadata, NgModuleMetadataType, ComponentMetadata, ComponentMetadataType, DirectiveMetadata, DirectiveMetadataType, PipeMetadata, PipeMetadataType, Type, PlatformRef} from '@angular/core';
|
||||
import {MetadataOverride} from '@angular/core/testing';
|
||||
import {TestingCompilerFactory, TestingCompiler} from './core_private_testing';
|
||||
import {platformCoreDynamic, RuntimeCompiler, DirectiveResolver, NgModuleResolver, PipeResolver} from './index';
|
||||
import {MockDirectiveResolver} from './testing/directive_resolver_mock';
|
||||
import {MockNgModuleResolver} from './testing/ng_module_resolver_mock';
|
||||
import {MockPipeResolver} from './testing/pipe_resolver_mock';
|
||||
import {MetadataOverrider} from './testing/metadata_overrider';
|
||||
import {TestingCompilerFactory, TestingCompiler} from './private_import_core';
|
||||
import {platformCoreDynamic, RuntimeCompiler, DirectiveResolver, NgModuleResolver, PipeResolver} from '@angular/compiler';
|
||||
import {MockDirectiveResolver} from './directive_resolver_mock';
|
||||
import {MockNgModuleResolver} from './ng_module_resolver_mock';
|
||||
import {MockPipeResolver} from './pipe_resolver_mock';
|
||||
import {MetadataOverrider} from './metadata_overrider';
|
||||
|
||||
@Injectable()
|
||||
export class TestingCompilerFactoryImpl implements TestingCompilerFactory {
|
@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
import {MetadataOverride} from '@angular/core/testing';
|
||||
import {stringify} from '../src/facade/lang';
|
||||
import {stringify} from './facade/lang';
|
||||
|
||||
type StringMap = {
|
||||
[key: string]: any
|
||||
|
@ -6,10 +6,10 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {NgModuleResolver} from '@angular/compiler';
|
||||
import {Compiler, Injectable, Injector, NgModuleMetadata, Type} from '@angular/core';
|
||||
|
||||
import {NgModuleResolver} from '../index';
|
||||
import {Map} from '../src/facade/collection';
|
||||
import {Map} from './facade/collection';
|
||||
|
||||
@Injectable()
|
||||
export class MockNgModuleResolver extends NgModuleResolver {
|
||||
|
@ -6,10 +6,10 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {PipeResolver} from '@angular/compiler';
|
||||
import {Compiler, Injectable, Injector, PipeMetadata, Type} from '@angular/core';
|
||||
|
||||
import {PipeResolver} from '../index';
|
||||
import {Map} from '../src/facade/collection';
|
||||
import {Map} from './facade/collection';
|
||||
|
||||
@Injectable()
|
||||
export class MockPipeResolver extends PipeResolver {
|
||||
|
23
modules/@angular/compiler/testing/private_import_core.ts
Normal file
23
modules/@angular/compiler/testing/private_import_core.ts
Normal 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 {__core_private__ as r} from '@angular/core';
|
||||
|
||||
export type ViewMetadata = typeof r._ViewMetadata;
|
||||
export var ViewMetadata: typeof r.ViewMetadata = r.ViewMetadata;
|
||||
|
||||
|
||||
|
||||
import {__core_private_testing__ as r2} from '@angular/core/testing';
|
||||
|
||||
export type TestingCompiler = typeof r2._TestingCompiler;
|
||||
export var TestingCompiler: typeof r2.TestingCompiler = r2.TestingCompiler;
|
||||
|
||||
export type TestingCompilerFactory = typeof r2._TestingCompilerFactory;
|
||||
export var TestingCompilerFactory: typeof r2.TestingCompilerFactory = r2.TestingCompilerFactory;
|
@ -6,10 +6,10 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {ResourceLoader} from '@angular/compiler';
|
||||
import {ListWrapper, Map} from './facade/collection';
|
||||
import {isBlank, normalizeBlank} from './facade/lang';
|
||||
|
||||
import {ResourceLoader} from '../index';
|
||||
import {ListWrapper, Map} from '../src/facade/collection';
|
||||
import {isBlank, normalizeBlank} from '../src/facade/lang';
|
||||
|
||||
|
||||
/**
|
||||
|
@ -6,10 +6,10 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {ElementSchemaRegistry} from '@angular/compiler';
|
||||
import {SchemaMetadata, SecurityContext} from '@angular/core';
|
||||
|
||||
import {ElementSchemaRegistry} from '../index';
|
||||
import {isPresent} from '../src/facade/lang';
|
||||
import {isPresent} from './facade/lang';
|
||||
|
||||
export class MockSchemaRegistry implements ElementSchemaRegistry {
|
||||
constructor(
|
||||
|
@ -7,11 +7,13 @@
|
||||
*/
|
||||
|
||||
import {ElementSchemaRegistry, ResourceLoader, UrlResolver} from '@angular/compiler';
|
||||
import {createUrlResolverWithoutPackagePrefix} from '@angular/compiler/src/url_resolver';
|
||||
import {MockSchemaRegistry} from '@angular/compiler/testing';
|
||||
import {MockResourceLoader} from '@angular/compiler/testing/resource_loader_mock';
|
||||
import {Provider} from '@angular/core';
|
||||
import {MockResourceLoader} from './resource_loader_mock';
|
||||
import {MockSchemaRegistry} from './schema_registry_mock';
|
||||
|
||||
export function createUrlResolverWithoutPackagePrefix(): UrlResolver {
|
||||
return new UrlResolver();
|
||||
}
|
||||
|
||||
// This provider is put here just so that we can access it from multiple
|
||||
// internal test packages.
|
||||
|
@ -4,22 +4,23 @@
|
||||
"declaration": true,
|
||||
"stripInternal": true,
|
||||
"experimentalDecorators": true,
|
||||
"module": "commonjs",
|
||||
"module": "es2015",
|
||||
"moduleResolution": "node",
|
||||
"outDir": "../../../dist/packages-dist/compiler/",
|
||||
"paths": {
|
||||
"@angular/core": ["../../../dist/packages-dist/core"],
|
||||
"@angular/core/testing": ["../../../dist/packages-dist/core/testing"]
|
||||
"@angular/core/testing": ["../../../dist/packages-dist/core/testing"],
|
||||
"@angular/compiler": ["../../../dist/packages-dist/compiler"]
|
||||
},
|
||||
"rootDir": ".",
|
||||
"sourceMap": true,
|
||||
"inlineSources": true,
|
||||
"lib": ["es6", "dom"],
|
||||
"target": "es5"
|
||||
"target": "es5",
|
||||
"skipLibCheck": true
|
||||
},
|
||||
"files": [
|
||||
"index.ts",
|
||||
"testing.ts",
|
||||
"testing/index.ts",
|
||||
"../../../node_modules/zone.js/dist/zone.js.d.ts"
|
||||
]
|
||||
}
|
@ -7,7 +7,7 @@
|
||||
"experimentalDecorators": true,
|
||||
"module": "es2015",
|
||||
"moduleResolution": "node",
|
||||
"outDir": "../../../dist/packages-dist/compiler/esm",
|
||||
"outDir": "../../../dist/packages-dist/compiler",
|
||||
"paths": {
|
||||
"@angular/core": ["../../../dist/packages-dist/core"],
|
||||
"@angular/core/testing": ["../../../dist/packages-dist/core/testing"]
|
||||
@ -15,11 +15,12 @@
|
||||
"rootDir": ".",
|
||||
"sourceMap": true,
|
||||
"inlineSources": true,
|
||||
"target": "es2015"
|
||||
"target": "es5",
|
||||
"skipLibCheck": true,
|
||||
"lib": ["es2015", "dom"]
|
||||
},
|
||||
"files": [
|
||||
"index.ts",
|
||||
"testing.ts",
|
||||
"../../../node_modules/zone.js/dist/zone.js.d.ts"
|
||||
]
|
||||
}
|
Reference in New Issue
Block a user