| 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.transformer; | 5 library barback.transformer; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:io'; | |
| 9 | 8 |
| 10 import 'asset.dart'; | 9 import 'asset.dart'; |
| 11 import 'transform.dart'; | 10 import 'transform.dart'; |
| 12 | 11 |
| 13 /// A [Transformer] represents a processor that takes in one or more input | 12 /// A [Transformer] represents a processor that takes in one or more input |
| 14 /// assets and uses them to generate one or more output assets. | 13 /// assets and uses them to generate one or more output assets. |
| 15 /// | 14 /// |
| 16 /// Dart2js, a SASS->CSS processor, a CSS spriter, and a tool to concatenate | 15 /// Dart2js, a SASS->CSS processor, a CSS spriter, and a tool to concatenate |
| 17 /// files are all examples of transformers. To define your own transformation | 16 /// files are all examples of transformers. To define your own transformation |
| 18 /// step, extend (or implement) this class. | 17 /// step, extend (or implement) this class. |
| (...skipping 20 matching lines...) Expand all Loading... |
| 39 /// generated assets back to the system. Either can be called multiple times, | 38 /// generated assets back to the system. Either can be called multiple times, |
| 40 /// in any order. | 39 /// in any order. |
| 41 /// | 40 /// |
| 42 /// In other words, a Transformer's job is to find all inputs for a | 41 /// In other words, a Transformer's job is to find all inputs for a |
| 43 /// transform, starting at the primary input, then generate all output assets | 42 /// transform, starting at the primary input, then generate all output assets |
| 44 /// and yield them back to the transform. | 43 /// and yield them back to the transform. |
| 45 Future apply(Transform transform); | 44 Future apply(Transform transform); |
| 46 | 45 |
| 47 String toString() => runtimeType.toString().replaceAll("Transformer", ""); | 46 String toString() => runtimeType.toString().replaceAll("Transformer", ""); |
| 48 } | 47 } |
| OLD | NEW |