refactor(ivy): ngcc - remove the targetPath properties of Transformer and Renderer (#29556)

We have already removed this concept from the public API. This just cleans it out altogether.

The `targetPath` was an alternative output path to the original `basePath`.
This is not really a very useful concept, since the actual target path
of each output file is more complex and not consistently relative to the `basePath`.

PR Close #29556
This commit is contained in:
Pete Bacon Darwin
2019-03-27 16:48:20 +00:00
committed by Jason Aden
parent 632669f069
commit c456b73302
8 changed files with 13 additions and 16 deletions

View File

@ -15,9 +15,8 @@ import {EntryPointBundle} from '../packages/entry_point_bundle';
export class Esm5Renderer extends EsmRenderer {
constructor(
host: NgccReflectionHost, isCore: boolean, bundle: EntryPointBundle, sourcePath: string,
targetPath: string) {
super(host, isCore, bundle, sourcePath, targetPath);
host: NgccReflectionHost, isCore: boolean, bundle: EntryPointBundle, sourcePath: string) {
super(host, isCore, bundle, sourcePath);
}
/**

View File

@ -17,9 +17,8 @@ import {isDtsPath} from '../../../src/ngtsc/util/src/typescript';
export class EsmRenderer extends Renderer {
constructor(
host: NgccReflectionHost, isCore: boolean, bundle: EntryPointBundle, sourcePath: string,
targetPath: string) {
super(host, isCore, bundle, sourcePath, targetPath);
host: NgccReflectionHost, isCore: boolean, bundle: EntryPointBundle, sourcePath: string) {
super(host, isCore, bundle, sourcePath);
}
/**

View File

@ -81,8 +81,7 @@ export const RedundantDecoratorMap = Map;
export abstract class Renderer {
constructor(
protected host: NgccReflectionHost, protected isCore: boolean,
protected bundle: EntryPointBundle, protected sourcePath: string,
protected targetPath: string) {}
protected bundle: EntryPointBundle, protected sourcePath: string) {}
renderProgram(
decorationAnalyses: DecorationAnalyses, switchMarkerAnalyses: SwitchMarkerAnalyses,
@ -333,7 +332,7 @@ export abstract class Renderer {
const outputPath = resolve(this.targetPath, relative(this.sourcePath, sourceFile.fileName));
const outputMapPath = `${outputPath}.map`;
const outputMap = output.generateMap({
source: sourceFile.fileName,
source: outputPath,
includeContent: true,
// hires: true // TODO: This results in accurate but huge sourcemaps. Instead we should fix
// the merge algorithm.