From 7c2846e34b8a9ed119ed05a4702cb02f8c97dd6c Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Tue, 19 Aug 2014 11:13:54 +0200 Subject: [PATCH] refactor: remove unused import clauses --- lib/cache/js_cache_register.dart | 1 - lib/cache/module.dart | 1 - lib/change_detection/ast_parser.dart | 1 - lib/core/annotation_src.dart | 2 -- lib/core/module_internal.dart | 6 ------ lib/core/parser/dynamic_parser.dart | 1 - lib/core/parser/lexer.dart | 1 - lib/core_dom/directive_injector.dart | 1 - lib/core_dom/static_keys.dart | 1 - lib/formatter/module_internal.dart | 1 - lib/introspection.dart | 3 +-- lib/transformer.dart | 2 -- 12 files changed, 1 insertion(+), 20 deletions(-) diff --git a/lib/cache/js_cache_register.dart b/lib/cache/js_cache_register.dart index ce54a499f..71464c973 100644 --- a/lib/cache/js_cache_register.dart +++ b/lib/cache/js_cache_register.dart @@ -5,7 +5,6 @@ library angular.cache.js; import 'dart:js' as js; import 'package:di/di.dart'; import 'package:di/annotations.dart'; -import 'package:angular/core/annotation_src.dart'; import 'package:angular/cache/module.dart'; Key JS_CACHE_REGISTER_KEY = new Key(JsCacheRegister); diff --git a/lib/cache/module.dart b/lib/cache/module.dart index 6296700fd..b13ad4cfb 100644 --- a/lib/cache/module.dart +++ b/lib/cache/module.dart @@ -1,7 +1,6 @@ library angular.cache; import 'dart:collection'; -import 'dart:async'; import 'package:di/di.dart'; import 'package:di/annotations.dart'; diff --git a/lib/change_detection/ast_parser.dart b/lib/change_detection/ast_parser.dart index 898faa9c3..2f3309450 100644 --- a/lib/change_detection/ast_parser.dart +++ b/lib/change_detection/ast_parser.dart @@ -6,7 +6,6 @@ import 'package:di/annotations.dart'; import 'package:angular/core/parser/syntax.dart' as syntax; import 'package:angular/core/parser/parser.dart'; import 'package:angular/core/formatter.dart'; -import 'package:angular/core/annotation_src.dart'; import 'package:angular/change_detection/watch_group.dart'; import 'package:angular/change_detection/change_detection.dart'; import 'package:angular/core/parser/utils.dart'; diff --git a/lib/core/annotation_src.dart b/lib/core/annotation_src.dart index b2384b5b1..bd6c70bb1 100644 --- a/lib/core/annotation_src.dart +++ b/lib/core/annotation_src.dart @@ -1,7 +1,5 @@ library angular.core.annotation_src; -import "package:di/di.dart" show Injector, Visibility, Factory; - abstract class DirectiveBinder { void bind(key, {dynamic toValue, Function toFactory, diff --git a/lib/core/module_internal.dart b/lib/core/module_internal.dart index a024f1480..3680ae54e 100644 --- a/lib/core/module_internal.dart +++ b/lib/core/module_internal.dart @@ -10,11 +10,8 @@ import 'package:di/annotations.dart'; import 'package:angular/core/parser/parser.dart'; import 'package:angular/core/parser/lexer.dart'; -import 'package:angular/utils.dart'; import 'package:angular/ng_tracing.dart'; -import 'package:angular/core/annotation_src.dart'; - import 'package:angular/cache/module.dart'; import 'package:angular/change_detection/watch_group.dart'; export 'package:angular/change_detection/watch_group.dart'; @@ -23,9 +20,6 @@ import 'package:angular/change_detection/change_detection.dart'; import 'package:angular/change_detection/dirty_checking_change_detector.dart'; import 'package:angular/core/formatter.dart'; export 'package:angular/core/formatter.dart'; -import 'package:angular/core/parser/utils.dart'; -import 'package:angular/core/registry.dart'; -import 'package:angular/core/static_keys.dart'; part "exception_handler.dart"; part "interpolate.dart"; diff --git a/lib/core/parser/dynamic_parser.dart b/lib/core/parser/dynamic_parser.dart index a46254ee9..fe11a3423 100644 --- a/lib/core/parser/dynamic_parser.dart +++ b/lib/core/parser/dynamic_parser.dart @@ -2,7 +2,6 @@ library angular.core.parser.dynamic_parser; import 'package:di/annotations.dart'; import 'package:angular/cache/module.dart'; -import 'package:angular/core/annotation_src.dart' hide Formatter; import 'package:angular/core/formatter.dart' show FormatterMap; import 'package:angular/core/parser/parser.dart'; diff --git a/lib/core/parser/lexer.dart b/lib/core/parser/lexer.dart index 46abe864a..c6f470971 100644 --- a/lib/core/parser/lexer.dart +++ b/lib/core/parser/lexer.dart @@ -1,7 +1,6 @@ library angular.core.parser.lexer; import 'package:di/annotations.dart'; -import 'package:angular/core/annotation_src.dart'; import 'package:angular/core/parser/characters.dart'; part 'tokens.dart'; diff --git a/lib/core_dom/directive_injector.dart b/lib/core_dom/directive_injector.dart index 950f9da1f..0a77db6e9 100644 --- a/lib/core_dom/directive_injector.dart +++ b/lib/core_dom/directive_injector.dart @@ -1,6 +1,5 @@ library angular.node_injector; -import 'dart:collection'; import 'dart:html' show Node, Element, ShadowRoot; import 'dart:profiler'; diff --git a/lib/core_dom/static_keys.dart b/lib/core_dom/static_keys.dart index 8c770c9f7..b7d03e8c0 100644 --- a/lib/core_dom/static_keys.dart +++ b/lib/core_dom/static_keys.dart @@ -3,7 +3,6 @@ library angular.core_dom.static_keys; import 'dart:html' as dom; import 'package:di/di.dart'; import 'package:angular/cache/module.dart'; -import 'package:angular/core/static_keys.dart'; import 'package:angular/core_dom/module_internal.dart'; export 'package:angular/directive/static_keys.dart' show NG_BASE_CSS_KEY; diff --git a/lib/formatter/module_internal.dart b/lib/formatter/module_internal.dart index c9f148572..627f62558 100644 --- a/lib/formatter/module_internal.dart +++ b/lib/formatter/module_internal.dart @@ -4,7 +4,6 @@ import 'dart:convert' show JSON; import 'package:intl/intl.dart'; import 'package:di/di.dart'; import 'package:angular/core/annotation.dart'; -import 'package:angular/core/module_internal.dart'; import 'package:angular/core/parser/parser.dart'; part 'currency.dart'; diff --git a/lib/introspection.dart b/lib/introspection.dart index a4aebc0d5..29eb7c11d 100644 --- a/lib/introspection.dart +++ b/lib/introspection.dart @@ -7,7 +7,6 @@ import 'dart:async' as async; import 'dart:html' as dom; import 'dart:js' as js; import 'package:di/di.dart'; -import 'package:angular/animate/module.dart'; import 'package:angular/core/module_internal.dart'; import 'package:angular/core_dom/module_internal.dart'; import 'package:angular/core_dom/directive_injector.dart' show DirectiveInjector; @@ -231,7 +230,7 @@ _jsify(var obj) { return _jsFunction(obj); } if ((obj is Map) || (obj is Iterable)) { - var mappedObj = (obj is Map) ? + var mappedObj = (obj is Map) ? new Map.fromIterables(obj.keys, obj.values.map(_jsify)) : obj.map(_jsify); if (obj is List) { return new js.JsArray.from(mappedObj); diff --git a/lib/transformer.dart b/lib/transformer.dart index f8637a8ea..05052c2c1 100644 --- a/lib/transformer.dart +++ b/lib/transformer.dart @@ -1,7 +1,6 @@ library angular.transformer; import 'dart:async'; -import 'dart:io'; import 'package:angular/tools/transformer/expression_generator.dart'; import 'package:angular/tools/transformer/metadata_generator.dart'; import 'package:angular/tools/transformer/static_angular_generator.dart'; @@ -10,7 +9,6 @@ import 'package:angular/tools/transformer/options.dart'; import 'package:barback/barback.dart'; import 'package:code_transformers/resolver.dart'; import 'package:di/transformer.dart' as di; -import 'package:path/path.dart' as path; /**