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

Unified Diff: pkg/barback/lib/src/transformer.dart

Issue 223553008: Only pass an AssetId to isPrimary and declareOutputs. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fix script_compactor 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/lib/src/transform_node.dart ('k') | pkg/barback/pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/barback/lib/src/transformer.dart
diff --git a/pkg/barback/lib/src/transformer.dart b/pkg/barback/lib/src/transformer.dart
index 83e2e2b2c5f80d943ae5cdc167e35e74b3f7d0ef..2b9499af2b8fa85bdd97f75f93d0eda202598384 100644
--- a/pkg/barback/lib/src/transformer.dart
+++ b/pkg/barback/lib/src/transformer.dart
@@ -6,7 +6,7 @@ library barback.transformer;
import 'dart:async';
-import 'asset.dart';
+import 'asset_id.dart';
import 'transform.dart';
import 'utils.dart';
@@ -43,7 +43,7 @@ abstract class Transformer {
'${pluralize("doesn't", invalidExtensions.length, plural: "don't")}.');
}
- /// Returns `true` if [input] can be a primary input for this transformer.
+ /// Returns `true` if [id] can be a primary input for this transformer.
///
/// While a transformer can read from multiple input files, one must be the
/// "primary" input. This asset determines whether the transformation should
@@ -59,12 +59,12 @@ abstract class Transformer {
/// If this is not overridden, defaults to allow any asset whose extension
/// matches one of the ones returned by [allowedExtensions]. If *that* is
/// not overridden, allows all assets.
- Future<bool> isPrimary(Asset input) {
+ Future<bool> isPrimary(AssetId id) {
// Allow all files if [primaryExtensions] is not overridden.
if (allowedExtensions == null) return new Future.value(true);
for (var extension in allowedExtensions.split(" ")) {
- if (input.id.path.endsWith(extension)) return new Future.value(true);
+ if (id.path.endsWith(extension)) return new Future.value(true);
}
return new Future.value(false);
« no previous file with comments | « pkg/barback/lib/src/transform_node.dart ('k') | pkg/barback/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698