feat(dart/transform): DirectiveProcessor: do not process generated files

Prevent `DirectiveProcessor` from processing files which were generated
by the Angular2 Dart transformer.

Closes #6517
This commit is contained in:
Tim Blasi 2016-01-15 11:05:20 -08:00 committed by Timothy Blasi
parent a24ee6add4
commit 78bfdf78ea
2 changed files with 4 additions and 1 deletions

View File

@ -39,8 +39,10 @@ const ALL_EXTENSIONS = const [
bool isGenerated(String uri) {
return const [
DEPS_EXTENSION,
META_EXTENSION,
NON_SHIMMED_STYLESHEET_EXTENSION,
SHIMMED_STYLESHEET_EXTENSION,
SUMMARY_META_EXTENSION,
TEMPLATE_EXTENSION,
].any((ext) => uri.endsWith(ext));
}

View File

@ -28,7 +28,8 @@ class DirectiveProcessor extends Transformer implements LazyTransformer {
DirectiveProcessor(this.options);
@override
bool isPrimary(AssetId id) => id.extension.endsWith('dart');
bool isPrimary(AssetId id) =>
id.extension.endsWith('dart') && !isGenerated(id.path);
@override
declareOutputs(DeclaringTransform transform) {