OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 /// Some Transformers to maintain compatibility with the new `test` package, | 5 /// Some Transformers to maintain compatibility with the new `test` package, |
6 /// since it doesn't use normal dart script tags in html. We get around this by | 6 /// since it doesn't use normal dart script tags in html. We get around this by |
7 /// using two transformers: | 7 /// using two transformers: |
8 /// - A transformer to convert <lint rel="x-dart-test"> intro dart script tags | 8 /// - A transformer to convert <lint rel="x-dart-test"> intro dart script tags |
9 /// so that they can be processed by the rest of the transformers normally. | 9 /// so that they can be processed by the rest of the transformers normally. |
10 /// - A second transformer to convert the output back, so that the `test` | 10 /// - A second transformer to convert the output back, so that the `test` |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 | 70 |
71 _EntryPointOnlyTransformer(this.entryPoints) : super(); | 71 _EntryPointOnlyTransformer(this.entryPoints) : super(); |
72 | 72 |
73 bool isPrimary(AssetId id) { | 73 bool isPrimary(AssetId id) { |
74 if (!id.path.startsWith('test/')) return false; | 74 if (!id.path.startsWith('test/')) return false; |
75 if (entryPoints != null) return entryPoints.contains(id.path); | 75 if (entryPoints != null) return entryPoints.contains(id.path); |
76 // If no entry point is supplied, then any html file is an entry point. | 76 // If no entry point is supplied, then any html file is an entry point. |
77 return id.path.endsWith('.html'); | 77 return id.path.endsWith('.html'); |
78 } | 78 } |
79 } | 79 } |
OLD | NEW |