refactor(core): move schematic component template visitor to utils (#29713)

PR Close #29713
This commit is contained in:
Paul Gschwendtner 2019-04-04 14:04:31 +02:00 committed by Igor Minar
parent cc2e4b639b
commit b507d076be
5 changed files with 8 additions and 7 deletions

View File

@ -9,7 +9,7 @@
import {PropertyWrite, parseTemplate} from '@angular/compiler';
import {Variable, visitAll} from '@angular/compiler/src/render3/r3_ast';
import {ResolvedTemplate} from './angular/ng_component_template';
import {ResolvedTemplate} from '../../utils/ng_component_template';
import {PropertyAssignment, PropertyWriteHtmlVisitor} from './angular/property_write_html_visitor';
export interface TemplateVariableAssignment {

View File

@ -7,6 +7,7 @@ ts_library(
visibility = ["//packages/core/schematics/test:__pkg__"],
deps = [
"//packages/core/schematics/migrations/template-var-assignment",
"//packages/core/schematics/utils",
"//packages/core/schematics/utils/tslint",
"@npm//tslint",
],

View File

@ -11,7 +11,7 @@ import * as ts from 'typescript';
import {createHtmlSourceFile} from '../../../utils/tslint/tslint_html_source_file';
import {analyzeResolvedTemplate} from '../analyze_template';
import {NgComponentTemplateVisitor} from '../angular/ng_component_template';
import {NgComponentTemplateVisitor} from '../../../utils/ng_component_template';
const FAILURE_MESSAGE = 'Found assignment to template variable. This does not work with Ivy and ' +
'needs to be updated.';

View File

@ -15,7 +15,7 @@ import {getProjectTsConfigPaths} from '../../utils/project_tsconfig_paths';
import {parseTsconfigFile} from '../../utils/typescript/parse_tsconfig';
import {analyzeResolvedTemplate} from './analyze_template';
import {NgComponentTemplateVisitor} from './angular/ng_component_template';
import {NgComponentTemplateVisitor} from '../../utils/ng_component_template';
type Logger = logging.LoggerApi;

View File

@ -10,10 +10,10 @@ import {existsSync, readFileSync} from 'fs';
import {dirname, resolve} from 'path';
import * as ts from 'typescript';
import {computeLineStartsMap, getLineAndCharacterFromPosition} from '../../../utils/line_mappings';
import {getAngularDecorators} from '../../../utils/ng_decorators';
import {unwrapExpression} from '../../../utils/typescript/functions';
import {getPropertyNameText} from '../../../utils/typescript/property_name';
import {computeLineStartsMap, getLineAndCharacterFromPosition} from './line_mappings';
import {getAngularDecorators} from './ng_decorators';
import {unwrapExpression} from './typescript/functions';
import {getPropertyNameText} from './typescript/property_name';
export interface ResolvedTemplate {
/** File content of the given template. */