| 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 import 'dart:convert'; | 8 import 'dart:convert'; |
| 9 | 9 |
| 10 import 'package:source_maps/span.dart'; | 10 import 'package:source_maps/span.dart'; |
| 11 | 11 |
| 12 import 'asset.dart'; | 12 import 'asset.dart'; |
| 13 import 'asset_id.dart'; | 13 import 'asset_id.dart'; |
| 14 import 'asset_node.dart'; | 14 import 'asset_node.dart'; |
| 15 import 'asset_set.dart'; | 15 import 'asset_set.dart'; |
| 16 import 'barback_logger.dart'; | |
| 17 import 'errors.dart'; | 16 import 'errors.dart'; |
| 17 import 'log.dart'; |
| 18 import 'transform_logger.dart'; | 18 import 'transform_logger.dart'; |
| 19 import 'transform_node.dart'; | 19 import 'transform_node.dart'; |
| 20 import 'utils.dart'; | 20 import 'utils.dart'; |
| 21 | 21 |
| 22 typedef void LogFunction(AssetId asset, LogLevel level, String message, | 22 typedef void LogFunction(AssetId asset, LogLevel level, String message, |
| 23 Span span); | 23 Span span); |
| 24 | 24 |
| 25 /// Creates a [Transform] by forwarding to the private constructor. | 25 /// Creates a [Transform] by forwarding to the private constructor. |
| 26 /// | 26 /// |
| 27 /// Lets [TransformNode] create [Transforms] without giving a [Transform] | 27 /// Lets [TransformNode] create [Transforms] without giving a [Transform] |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 | 100 |
| 101 /// Stores [output] as the output created by this transformation. | 101 /// Stores [output] as the output created by this transformation. |
| 102 /// | 102 /// |
| 103 /// A transformation can output as many assets as it wants. | 103 /// A transformation can output as many assets as it wants. |
| 104 void addOutput(Asset output) { | 104 void addOutput(Asset output) { |
| 105 // TODO(rnystrom): This should immediately throw if an output with that ID | 105 // TODO(rnystrom): This should immediately throw if an output with that ID |
| 106 // has already been created by this transformer. | 106 // has already been created by this transformer. |
| 107 _outputs.add(output); | 107 _outputs.add(output); |
| 108 } | 108 } |
| 109 } | 109 } |
| OLD | NEW |