feat(dart/transform): Detect annotations which extend Injectable or Template.

Create a method that recursively walks imports from an entry point and
determines where classes are registered.

Use this information to determine if a particular annotation implements or
extends Injectable or Template.
This commit is contained in:
Jacob MacDonald
2015-03-19 15:47:10 -07:00
parent 6600ac7031
commit c65fd31e86
12 changed files with 286 additions and 29 deletions
@@ -8,6 +8,10 @@ import 'package:dart_style/dart_style.dart';
import '../common/read_file.dart';
main() {
allTests();
}
var formatter = new DartFormatter();
var transform = new AngularTransformerGroup(new TransformerOptions(
['web/index.dart'],
@@ -39,7 +43,10 @@ void allTests() {
'../../../lib/src/core/annotations/annotations.dart',
'angular2|lib/src/core/application.dart': '../common/application.dart',
'angular2|lib/src/reflection/reflection_capabilities.dart':
'../common/reflection_capabilities.dart'
'../common/reflection_capabilities.dart',
'angular2|lib/di.dart': '../../../lib/di.dart',
'angular2|lib/src/di/annotations.dart':
'../../../lib/src/di/annotations.dart',
};
var tests = [