refactor(compiler): renames

- `NgHost` to `CompilerHost`
- `AotCompilerHost.resolveFileToImport` to `AotCompilerHost.fileNameToModuleName`
- `AotCompilerHoset.resolveImportToFile` to `AotCompilerHost.moduleNameToFileName`
This commit is contained in:
Tobias Bosch
2016-11-17 12:24:33 -08:00
committed by Chuck Jazdzewski
parent dddbb1c1cb
commit adeea5d86a
15 changed files with 92 additions and 86 deletions

View File

@ -511,12 +511,12 @@ class MockAotCompilerHost implements AotCompilerHost {
loadResource(filePath: string): Promise<string> { throw new Error('Should not be called!'); }
resolveFileToImport(importedFilePath: string, containingFilePath: string): string {
fileNameToModuleName(importedFilePath: string, containingFilePath: string): string {
throw new Error('Should not be called!');
}
// In tests, assume that symbols are not re-exported
resolveImportToFile(modulePath: string, containingFile?: string): string {
moduleNameToFileName(modulePath: string, containingFile?: string): string {
function splitPath(path: string): string[] { return path.split(/\/|\\/g); }
function resolvePath(pathParts: string[]): string {

View File

@ -253,7 +253,7 @@ function createOperatorFn(op: o.BinaryOperator) {
}
export class SimpleJsImportGenerator implements ImportResolver {
resolveFileToImport(importedUrlStr: string, moduleUrlStr: string): string {
fileNameToModuleName(importedUrlStr: string, moduleUrlStr: string): string {
return importedUrlStr;
}
}