Chromium Code Reviews| 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 import 'package:source_maps/span.dart' show Span; | |
|
nweiz
2013/10/22 23:18:23
Style nit: add a newline before this. Also, we ten
Siggi Cherem (dart-lang)
2013/10/22 23:41:18
Done.
| |
| 9 | 10 |
| 10 import 'asset.dart'; | 11 import 'asset.dart'; |
| 11 import 'asset_id.dart'; | 12 import 'asset_id.dart'; |
| 12 import 'asset_node.dart'; | 13 import 'asset_node.dart'; |
| 13 import 'asset_set.dart'; | 14 import 'asset_set.dart'; |
| 15 import 'barback_logger.dart'; | |
| 14 import 'errors.dart'; | 16 import 'errors.dart'; |
| 15 import 'transform_logger.dart'; | 17 import 'transform_logger.dart'; |
| 16 import 'transform_node.dart'; | 18 import 'transform_node.dart'; |
| 17 import 'utils.dart'; | 19 import 'utils.dart'; |
| 18 | 20 |
| 19 typedef void LogFunction(AssetId asset, LogLevel level, String message, | 21 typedef void LogFunction(AssetId asset, LogLevel level, String message, |
| 20 Span span); | 22 Span span); |
| 21 | 23 |
| 22 /// Creates a [Transform] by forwarding to the private constructor. | 24 /// Creates a [Transform] by forwarding to the private constructor. |
| 23 /// | 25 /// |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 97 | 99 |
| 98 /// Stores [output] as the output created by this transformation. | 100 /// Stores [output] as the output created by this transformation. |
| 99 /// | 101 /// |
| 100 /// A transformation can output as many assets as it wants. | 102 /// A transformation can output as many assets as it wants. |
| 101 void addOutput(Asset output) { | 103 void addOutput(Asset output) { |
| 102 // TODO(rnystrom): This should immediately throw if an output with that ID | 104 // TODO(rnystrom): This should immediately throw if an output with that ID |
| 103 // has already been created by this transformer. | 105 // has already been created by this transformer. |
| 104 _outputs.add(output); | 106 _outputs.add(output); |
| 105 } | 107 } |
| 106 } | 108 } |
| OLD | NEW |