Skip to content

Commit 3df8363

Browse files
committed
chore(transformers): cleanup unneeded _toDepsUri function
Cleanu unneeded _toDepsUri function in favor of the common toDepsExtension.
1 parent 5cc84ed commit 3df8363

File tree

1 file changed

+1
-5
lines changed
  • modules/angular2/src/transform/directive_linker

1 file changed

+1
-5
lines changed

modules/angular2/src/transform/directive_linker/linker.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import 'package:angular2/src/transform/common/names.dart';
99
import 'package:angular2/src/transform/common/ng_deps.dart';
1010
import 'package:barback/barback.dart';
1111
import 'package:code_transformers/assets.dart';
12-
import 'package:path/path.dart' as path;
1312

1413
/// Checks the `.ng_deps.dart` file represented by `entryPoint` and
1514
/// determines whether it is necessary to the functioning of the Angular 2
@@ -93,9 +92,6 @@ List<UriBasedDirective> _getSortedDeps(NgDeps ngDeps) {
9392
..sort((a, b) => a.end.compareTo(b.end));
9493
}
9594

96-
String _toDepsUri(String importUri) =>
97-
'${path.withoutExtension(importUri)}${DEPS_EXTENSION}';
98-
9995
bool _isNotDartDirective(UriBasedDirective directive) {
10096
return !stringLiteralToString(directive.uri).startsWith('dart:');
10197
}
@@ -110,7 +106,7 @@ Future<Map<UriBasedDirective, String>> _processNgImports(AssetReader reader,
110106
.wait(directives
111107
.where(_isNotDartDirective)
112108
.map((UriBasedDirective directive) {
113-
var ngDepsUri = _toDepsUri(stringLiteralToString(directive.uri));
109+
var ngDepsUri = toDepsExtension(stringLiteralToString(directive.uri));
114110
var spanArg = null;
115111
var ngDepsAsset = uriToAssetId(entryPoint, ngDepsUri, logger, spanArg,
116112
errorOnAbsolute: false);

0 commit comments

Comments
 (0)