OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library pub.barback.transformer_config; | |
6 | |
7 import 'package:glob/glob.dart'; | 5 import 'package:glob/glob.dart'; |
8 import 'package:path/path.dart' as p; | 6 import 'package:path/path.dart' as p; |
9 import 'package:source_span/source_span.dart'; | 7 import 'package:source_span/source_span.dart'; |
10 import 'package:yaml/yaml.dart'; | 8 import 'package:yaml/yaml.dart'; |
11 | 9 |
12 import 'transformer_id.dart'; | 10 import 'transformer_id.dart'; |
13 | 11 |
14 /// The configuration for a transformer. | 12 /// The configuration for a transformer. |
15 /// | 13 /// |
16 /// This corresponds to the transformers listed in a pubspec, which have both an | 14 /// This corresponds to the transformers listed in a pubspec, which have both an |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 for (var exclude in excludes) { | 149 for (var exclude in excludes) { |
152 if (exclude.matches(pathWithinPackage)) return false; | 150 if (exclude.matches(pathWithinPackage)) return false; |
153 } | 151 } |
154 } | 152 } |
155 | 153 |
156 // If there are any includes, it must match one of them. | 154 // If there are any includes, it must match one of them. |
157 return includes == null || | 155 return includes == null || |
158 includes.any((include) => include.matches(pathWithinPackage)); | 156 includes.any((include) => include.matches(pathWithinPackage)); |
159 } | 157 } |
160 } | 158 } |
OLD | NEW |