OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS d.file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS d.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_tests; | 5 library pub_tests; |
6 | 6 |
7 import 'package:scheduled_test/scheduled_stream.dart'; | |
8 import 'package:scheduled_test/scheduled_test.dart'; | 7 import 'package:scheduled_test/scheduled_test.dart'; |
9 | 8 |
10 import '../descriptor.dart' as d; | 9 import '../descriptor.dart' as d; |
11 import '../test_pub.dart'; | 10 import '../test_pub.dart'; |
12 import '../serve/utils.dart'; | |
13 | 11 |
14 const REPLACE_FROM_LIBRARY_TRANSFORMER = """ | 12 const REPLACE_FROM_LIBRARY_TRANSFORMER = """ |
15 import 'dart:async'; | 13 import 'dart:async'; |
16 | 14 |
17 import 'package:barback/barback.dart'; | 15 import 'package:barback/barback.dart'; |
18 import 'package:bar/bar.dart'; | 16 import 'package:bar/bar.dart'; |
19 | 17 |
20 class ReplaceTransformer extends Transformer { | 18 class ReplaceTransformer extends Transformer { |
21 ReplaceTransformer.asPlugin(); | 19 ReplaceTransformer.asPlugin(); |
22 | 20 |
(...skipping 314 matching lines...) Loading... |
337 Future apply(Transform transform) { | 335 Future apply(Transform transform) { |
338 return transform.primaryInput.readAsString().then((contents) { | 336 return transform.primaryInput.readAsString().then((contents) { |
339 transform.addOutput(new Asset.fromString( | 337 transform.addOutput(new Asset.fromString( |
340 transform.primaryInput.id, | 338 transform.primaryInput.id, |
341 contents.replaceAll("$input", "$output"))); | 339 contents.replaceAll("$input", "$output"))); |
342 }); | 340 }); |
343 } | 341 } |
344 } | 342 } |
345 """; | 343 """; |
346 } | 344 } |
OLD | NEW |