refactor(compiler): remove asset: urls

These urls were just relicts from Dart.
This commit is contained in:
Tobias Bosch
2016-11-15 10:14:01 -08:00
committed by Chuck Jazdzewski
parent 24099bdbd2
commit 484119e59f
12 changed files with 23 additions and 99 deletions

View File

@ -13,8 +13,8 @@ import {beforeEach, describe, expect, it} from '@angular/core/testing/testing_in
import {SimpleJsImportGenerator} from './output_emitter_util';
const someModuleUrl = 'asset:somePackage/lib/somePath';
const anotherModuleUrl = 'asset:somePackage/lib/someOtherPath';
const someModuleUrl = 'somePackage/somePath';
const anotherModuleUrl = 'somePackage/someOtherPath';
const sameModuleIdentifier =
new CompileIdentifierMetadata({name: 'someLocalId', moduleUrl: someModuleUrl});

View File

@ -22,7 +22,7 @@ export class ExternalClass {
const testDataIdentifier = new CompileIdentifierMetadata({
name: 'ExternalClass',
moduleUrl: `asset:@angular/lib/compiler/test/output/output_emitter_util`,
moduleUrl: `@angular/compiler/test/output/output_emitter_util`,
reference: ExternalClass
});
@ -253,12 +253,5 @@ function createOperatorFn(op: o.BinaryOperator) {
}
export class SimpleJsImportGenerator implements ImportGenerator {
getImportPath(moduleUrlStr: string, importedUrlStr: string): string {
const importedAssetUrl = ImportGenerator.parseAssetUrl(importedUrlStr);
if (importedAssetUrl) {
return `${importedAssetUrl.packageName}/${importedAssetUrl.modulePath}`;
} else {
return importedUrlStr;
}
}
getImportPath(moduleUrlStr: string, importedUrlStr: string): string { return importedUrlStr; }
}

View File

@ -13,8 +13,8 @@ import {beforeEach, describe, expect, it} from '@angular/core/testing/testing_in
import {SimpleJsImportGenerator} from './output_emitter_util';
const someModuleUrl = 'asset:somePackage/lib/somePath';
const anotherModuleUrl = 'asset:somePackage/lib/someOtherPath';
const someModuleUrl = 'somePackage/somePath';
const anotherModuleUrl = 'somePackage/someOtherPath';
const sameModuleIdentifier =
new CompileIdentifierMetadata({name: 'someLocalId', moduleUrl: someModuleUrl});