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:
parent
a24ee6add4
commit
78bfdf78ea
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue