fix(dart/transform): Run DeferredRewriter in the correct phase

`DeferredRewriter` depends on the presence of `.ng_deps.dart` files,
which do not yet exist in the phase where it was previously run.

Update the transformer phases to fix this and add an integration test to
prevent regression.
This commit is contained in:
Tim Blasi
2015-10-07 16:18:28 -07:00
parent af1119063c
commit 811d4c03bd
7 changed files with 128 additions and 21 deletions

View File

@ -30,10 +30,11 @@ class AngularTransformerGroup extends TransformerGroup {
[new DirectiveProcessor(options)]
];
phases.addAll([
[new DeferredRewriter(options), new DirectiveMetadataLinker()],
[new DirectiveMetadataLinker()],
[new BindGenerator(options)],
[new TemplateCompiler(options)],
[new StylesheetCompiler()],
[new DeferredRewriter(options)]
]);
return new AngularTransformerGroup._(phases,
formatCode: options.formatCode);