| Index: sdk/lib/_internal/pub/lib/src/barback/transformer_config.dart
|
| diff --git a/sdk/lib/_internal/pub/lib/src/barback/transformer_config.dart b/sdk/lib/_internal/pub/lib/src/barback/transformer_config.dart
|
| index 676bd8cc97d1feb57179fd42b09e191f72185c83..42ff5ba534f081f244d8b54d60bedbe56ad043ea 100644
|
| --- a/sdk/lib/_internal/pub/lib/src/barback/transformer_config.dart
|
| +++ b/sdk/lib/_internal/pub/lib/src/barback/transformer_config.dart
|
| @@ -4,6 +4,7 @@
|
|
|
| library pub.barback.transformer_config;
|
|
|
| +import 'package:path/path.dart' as p;
|
| import 'package:source_maps/source_maps.dart';
|
| import 'package:yaml/yaml.dart';
|
|
|
| @@ -53,6 +54,14 @@ class TransformerConfig {
|
| /// processed.
|
| bool get hasExclusions => includes != null || excludes != null;
|
|
|
| + /// Returns whether this transformer might transform a file that's visible to
|
| + /// the package's dependers.
|
| + bool get canTransformPublicFiles {
|
| + if (includes == null) return true;
|
| + return includes.any((path) =>
|
| + p.url.isWithin('lib', path) || p.url.isWithin('bin', path));
|
| + }
|
| +
|
| /// Parses [identifier] as a [TransformerId] with [configuration].
|
| ///
|
| /// [identifierSpan] is the source span for [identifier].
|
|
|