| 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.transform; | 5 library barback.transform; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'asset.dart'; | 9 import 'asset.dart'; |
| 10 import 'asset_id.dart'; | 10 import 'asset_id.dart'; |
| 11 import 'asset_node.dart'; | 11 import 'asset_node.dart'; |
| 12 import 'asset_set.dart'; | 12 import 'asset_set.dart'; |
| 13 import 'errors.dart'; | 13 import 'errors.dart'; |
| 14 import 'transform_logger.dart'; | 14 import 'transform_logger.dart'; |
| 15 import 'transform_node.dart'; | 15 import 'transform_node.dart'; |
| 16 import 'utils.dart'; | |
| 17 | 16 |
| 18 /// Creates a [Transform] by forwarding to the private constructor. | 17 /// Creates a [Transform] by forwarding to the private constructor. |
| 19 /// | 18 /// |
| 20 /// Lets [TransformNode] create [Transforms] without giving a [Transform] | 19 /// Lets [TransformNode] create [Transforms] without giving a [Transform] |
| 21 /// itself a public constructor, which would be visible to external users. | 20 /// itself a public constructor, which would be visible to external users. |
| 22 /// Unlike the [Transform] class, this function is not exported by barback.dart. | 21 /// Unlike the [Transform] class, this function is not exported by barback.dart. |
| 23 Transform createTransform(TransformNode node, AssetSet outputs) => | 22 Transform createTransform(TransformNode node, AssetSet outputs) => |
| 24 new Transform._(node, outputs); | 23 new Transform._(node, outputs); |
| 25 | 24 |
| 26 /// While a [Transformer] represents a *kind* of transformation, this defines | 25 /// While a [Transformer] represents a *kind* of transformation, this defines |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 /// A transformation can output as many assets as it wants. | 64 /// A transformation can output as many assets as it wants. |
| 66 void addOutput(Asset output) { | 65 void addOutput(Asset output) { |
| 67 // TODO(rnystrom): This should immediately throw if an output with that ID | 66 // TODO(rnystrom): This should immediately throw if an output with that ID |
| 68 // has already been created by this transformer. | 67 // has already been created by this transformer. |
| 69 _outputs.add(output); | 68 _outputs.add(output); |
| 70 } | 69 } |
| 71 } | 70 } |
| 72 | 71 |
| 73 // TODO(sigmund,rnystrom): create a separate logger for each Transfom. | 72 // TODO(sigmund,rnystrom): create a separate logger for each Transfom. |
| 74 final TransformLogger _logger = new TransformLogger(true); | 73 final TransformLogger _logger = new TransformLogger(true); |
| OLD | NEW |