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.group_runner; | 5 library barback.group_runner; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
9 import 'asset_cascade.dart'; | 9 import 'asset_cascade.dart'; |
10 import 'asset_node.dart'; | 10 import 'asset_node.dart'; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 lastPhase = lastPhase.addPhase(phase); | 59 lastPhase = lastPhase.addPhase(phase); |
60 _phases.add(lastPhase); | 60 _phases.add(lastPhase); |
61 } | 61 } |
62 | 62 |
63 for (var phase in _phases) { | 63 for (var phase in _phases) { |
64 _onDirtyPool.add(phase.onDirty); | 64 _onDirtyPool.add(phase.onDirty); |
65 _onLogPool.add(phase.onLog); | 65 _onLogPool.add(phase.onLog); |
66 } | 66 } |
67 } | 67 } |
68 | 68 |
| 69 /// Force all [LazyTransformer]s' transforms in this group to begin producing |
| 70 /// concrete assets. |
| 71 void forceAllTransforms() { |
| 72 for (var phase in _phases) { |
| 73 phase.forceAllTransforms(); |
| 74 } |
| 75 } |
| 76 |
69 /// Adds a new asset as an input for this group. | 77 /// Adds a new asset as an input for this group. |
70 void addInput(AssetNode node) { | 78 void addInput(AssetNode node) { |
71 _phases.first.addInput(node); | 79 _phases.first.addInput(node); |
72 } | 80 } |
73 | 81 |
74 /// Removes this group and all sub-phases within it. | 82 /// Removes this group and all sub-phases within it. |
75 void remove() { | 83 void remove() { |
76 _phases.first.remove(); | 84 _phases.first.remove(); |
77 } | 85 } |
78 | 86 |
(...skipping 14 matching lines...) Expand all Loading... |
93 for (var output in newOutputs) { | 101 for (var output in newOutputs) { |
94 output.whenRemoved(() => _alreadyEmittedOutputs.remove(output)); | 102 output.whenRemoved(() => _alreadyEmittedOutputs.remove(output)); |
95 } | 103 } |
96 _alreadyEmittedOutputs.addAll(newOutputs); | 104 _alreadyEmittedOutputs.addAll(newOutputs); |
97 | 105 |
98 return new Future.value(newOutputs); | 106 return new Future.value(newOutputs); |
99 } | 107 } |
100 | 108 |
101 String toString() => "group in phase $_location for $_group"; | 109 String toString() => "group in phase $_location for $_group"; |
102 } | 110 } |
OLD | NEW |