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

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

Issue 299833003: Expose aggregate transformers in barback. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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
Index: pkg/barback/test/transformer/declaring_aggregate_many_to_one.dart
diff --git a/pkg/barback/test/transformer/declaring_aggregate_many_to_one.dart b/pkg/barback/test/transformer/declaring_aggregate_many_to_one.dart
new file mode 100644
index 0000000000000000000000000000000000000000..7f1874130c4609812b516877b88f6a70eda69101
--- /dev/null
+++ b/pkg/barback/test/transformer/declaring_aggregate_many_to_one.dart
@@ -0,0 +1,23 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library barback.test.transformer.declaring_aggregate_many_to_one;
+
+import 'package:barback/barback.dart';
+import 'package:path/path.dart' as path;
+
+import 'aggregate_many_to_one.dart';
+
+/// Like [AggregateManyToOneTransformer], but declares its assets ahead of time.
+class DeclaringAggregateManyToOneTransformer
+ extends AggregateManyToOneTransformer
+ implements DeclaringAggregateTransformer {
+ DeclaringAggregateManyToOneTransformer(String extension, String output)
+ : super(extension, output);
+
+ void declareOutputs(DeclaringAggregateTransform transform) {
+ transform.declareOutput(new AssetId(transform.package,
+ path.url.join(transform.key, output)));
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698