feat(dart/transform): Add a di transformer

Add a transformer for `di` which generates `.ng_deps.dart` files for all
`.dart` files it is run on. These `.ng_deps.dart` files register
metadata for any `@Injectable` classes.

Fix unit tests for changes introduced by the di transformer.

When using `pub (build|serve) --mode=ngstatic`, we will also generate
getters and setters, parse templates, and remove import of `dart:mirrors`
in the Angular transform. Because this is still relatively immature, we
use the mode to keep it opt-in for now.

Closes #700
This commit is contained in:
Tim Blasi
2015-03-19 14:10:28 -07:00
parent 788461b7e2
commit 09948f4403
39 changed files with 147 additions and 73 deletions
@@ -81,7 +81,7 @@ class Rewriter {
String _commentedNode(AstNode node) {
// TODO(kegluneq): Return commented code once we generate all needed code.
return _code.substring(node.offset, node.end);
return '/*${_code.substring(node.offset, node.end)}*/';
}
}