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

Unified Diff: sdk/lib/_internal/pub/test/transformer/configuration/with_configuration_only_instantiates_configurable_transformers_test.dart

Issue 52853004: Pass in "mode" to transformer plugins. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: "transformer" -> "configuration". Created 7 years, 2 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: sdk/lib/_internal/pub/test/transformer/configuration/with_configuration_only_instantiates_configurable_transformers_test.dart
diff --git a/sdk/lib/_internal/pub/test/transformer/configuration/with_configuration_only_instantiates_configurable_transformers_test.dart b/sdk/lib/_internal/pub/test/transformer/configuration/with_configuration_only_instantiates_configurable_transformers_test.dart
index 36e7d47688f96ba302b13f49eb9a9565c239025a..3f0a19599c8f5c4f7ce9f7d83f9dcf7aa6cc35b3 100644
--- a/sdk/lib/_internal/pub/test/transformer/configuration/with_configuration_only_instantiates_configurable_transformers_test.dart
+++ b/sdk/lib/_internal/pub/test/transformer/configuration/with_configuration_only_instantiates_configurable_transformers_test.dart
@@ -17,16 +17,17 @@ import 'dart:convert';
import 'package:barback/barback.dart';
class ConfigTransformer extends Transformer {
- final Map configuration;
+ final BarbackSettings settings;
- ConfigTransformer.asPlugin(this.configuration);
+ ConfigTransformer.asPlugin(this.settings);
String get allowedExtensions => '.txt';
Future apply(Transform transform) {
return transform.primaryInput.readAsString().then((contents) {
var id = transform.primaryInput.id.changeExtension(".json");
- transform.addOutput(new Asset.fromString(id, JSON.encode(configuration)));
+ transform.addOutput(
+ new Asset.fromString(id, JSON.encode(settings.configuration)));
});
}
}
@@ -71,4 +72,4 @@ main() {
requestShould404("foo.out");
endPubServe();
});
-}
+}

Powered by Google App Engine
This is Rietveld 408576698