| 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 barback.phase_input; | 5 library barback.phase_input; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:collection'; | 8 import 'dart:collection'; |
| 9 | 9 |
| 10 import 'asset.dart'; | 10 import 'asset.dart'; |
| 11 import 'asset_forwarder.dart'; | 11 import 'asset_forwarder.dart'; |
| 12 import 'asset_node.dart'; | 12 import 'asset_node.dart'; |
| 13 import 'errors.dart'; | 13 import 'errors.dart'; |
| 14 import 'phase.dart'; |
| 14 import 'stream_pool.dart'; | 15 import 'stream_pool.dart'; |
| 15 import 'transform_node.dart'; | 16 import 'transform_node.dart'; |
| 16 import 'transformer.dart'; | 17 import 'transformer.dart'; |
| 17 import 'utils.dart'; | 18 import 'utils.dart'; |
| 18 | 19 |
| 19 /// A class for watching a single [AssetNode] and running any transforms that | 20 /// A class for watching a single [AssetNode] and running any transforms that |
| 20 /// take that node as a primary input. | 21 /// take that node as a primary input. |
| 21 class PhaseInput { | 22 class PhaseInput { |
| 22 /// The phase for which this is an input. | 23 /// The phase for which this is an input. |
| 23 final Phase _phase; | 24 final Phase _phase; |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 return new Future.value( | 288 return new Future.value( |
| 288 new Set<AssetNode>.from([_passThroughController.node])); | 289 new Set<AssetNode>.from([_passThroughController.node])); |
| 289 } | 290 } |
| 290 | 291 |
| 291 return Future.wait(_transforms.map((transform) { | 292 return Future.wait(_transforms.map((transform) { |
| 292 if (!transform.isDirty) return new Future.value(new Set()); | 293 if (!transform.isDirty) return new Future.value(new Set()); |
| 293 return transform.apply(); | 294 return transform.apply(); |
| 294 })).then((outputs) => unionAll(outputs)); | 295 })).then((outputs) => unionAll(outputs)); |
| 295 } | 296 } |
| 296 } | 297 } |
| OLD | NEW |