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

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

Issue 808713003: Remove barback from the repo. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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/one_to_many.dart ('k') | pkg/barback/test/transformer/sync_rewrite.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/barback/test/transformer/rewrite.dart
diff --git a/pkg/barback/test/transformer/rewrite.dart b/pkg/barback/test/transformer/rewrite.dart
deleted file mode 100644
index d25a552a29f8e55cd46983fd1df91f255fca2db3..0000000000000000000000000000000000000000
--- a/pkg/barback/test/transformer/rewrite.dart
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright (c) 2013, 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.rewrite;
-
-import 'dart:async';
-
-import 'package:barback/barback.dart';
-
-import 'mock.dart';
-
-/// A [Transformer] that takes assets ending with one extension and generates
-/// assets with a given extension.
-///
-/// Appends the output extension to the contents of the input file.
-class RewriteTransformer extends MockTransformer {
- final String from;
- final String to;
-
- /// Creates a transformer that rewrites assets whose extension is [from] to
- /// one whose extension is [to].
- ///
- /// [to] may be a space-separated list in which case multiple outputs will be
- /// created for each input.
- RewriteTransformer(this.from, this.to);
-
- bool doIsPrimary(AssetId id) => id.extension == ".$from";
-
- Future doApply(Transform transform) {
- return getPrimary(transform).then((input) {
- return Future.wait(to.split(" ").map((extension) {
- var id = input.id.changeExtension(".$extension");
- return input.readAsString().then((content) {
- transform.addOutput(new Asset.fromString(id, "$content.$extension"));
- });
- }));
- });
- }
-
- String toString() => "$from->$to";
-}
« no previous file with comments | « pkg/barback/test/transformer/one_to_many.dart ('k') | pkg/barback/test/transformer/sync_rewrite.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698