repackaging: all the repackaging changes squashed

This commit is contained in:
Igor Minar
2016-04-28 17:50:03 -07:00
committed by Misko Hevery
parent 505da6c0a8
commit a66cdb469f
860 changed files with 7869 additions and 4985 deletions

View File

@ -6,8 +6,8 @@ import {
isArray,
isStrictStringMap,
isPrimitive
} from 'angular2/src/facade/lang';
import {StringMapWrapper} from 'angular2/src/facade/collection';
} from './facade/lang';
import {StringMapWrapper} from './facade/collection';
export var MODULE_SUFFIX = IS_DART ? '.dart' : '';
@ -69,3 +69,19 @@ export class ValueTransformer implements ValueVisitor {
visitPrimitive(value: any, context: any): any { return value; }
visitOther(value: any, context: any): any { return value; }
}
export function assetUrl(pkg: string, path: string = null, type:string = 'src'): string {
if (IS_DART) {
if (path == null) {
return `asset:angular2/${pkg}/${pkg}.dart`;
} else {
return `asset:angular2/lib/${pkg}/src/${path}.dart`;
}
} else {
if (path == null) {
return `asset:@angular/lib/${pkg}/index`;
} else {
return `asset:@angular/lib/${pkg}/src/${path}`;
}
}
}