Chromium Code Reviews| 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..df31d1095e2696de06417f2ff6d1697dbfa12dc7 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 [inputId] can be a primary input for this transformer. |
|
Bob Nystrom
2014/04/03 22:28:29
[id]
nweiz
2014/04/03 23:03:50
Done.
|
| /// |
| /// 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); |