Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2097)

Unified Diff: pkg/barback/test/transformer/lazy_rewrite.dart

Issue 227123007: Only run [declareOutputs] once for each asset/transformer pair. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/barback/test/transformer/lazy_many_to_one.dart ('k') | pkg/barback/test/transformer/log.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/barback/test/transformer/lazy_rewrite.dart
diff --git a/pkg/barback/test/transformer/lazy_rewrite.dart b/pkg/barback/test/transformer/lazy_rewrite.dart
index f694a0e77da6fd95176075593ed1be8179661b34..33a92cd16b742c1f20273c3159b91697c757af04 100644
--- a/pkg/barback/test/transformer/lazy_rewrite.dart
+++ b/pkg/barback/test/transformer/lazy_rewrite.dart
@@ -8,20 +8,12 @@ import 'dart:async';
import 'package:barback/barback.dart';
-import 'rewrite.dart';
+import 'declaring_rewrite.dart';
/// Like [RewriteTransformer], but returns a lazy asset that doesn't perform the
/// rewrite until it's materialized.
-class LazyRewriteTransformer extends RewriteTransformer
+class LazyRewriteTransformer extends DeclaringRewriteTransformer
implements LazyTransformer {
LazyRewriteTransformer(String from, String to)
: super(from, to);
-
- Future declareOutputs(DeclaringTransform transform) {
- if (consumePrimary) transform.consumePrimary();
- for (var extension in to.split(" ")) {
- var id = transform.primaryInput.id.changeExtension(".$extension");
- transform.declareOutput(id);
- }
- }
}
« no previous file with comments | « pkg/barback/test/transformer/lazy_many_to_one.dart ('k') | pkg/barback/test/transformer/log.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698