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:
@@ -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)}*/';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user