| 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.barback; | 5 library barback.barback; |
| 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_set.dart'; |
| 11 import 'build_result.dart'; | 12 import 'build_result.dart'; |
| 12 import 'errors.dart'; | 13 import 'errors.dart'; |
| 13 import 'package_graph.dart'; | 14 import 'package_graph.dart'; |
| 14 import 'package_provider.dart'; | 15 import 'package_provider.dart'; |
| 15 | 16 |
| 16 /// A general-purpose asynchronous build dependency graph manager. | 17 /// A general-purpose asynchronous build dependency graph manager. |
| 17 /// | 18 /// |
| 18 /// It consumes source assets (including Dart files) in a set of packages, | 19 /// It consumes source assets (including Dart files) in a set of packages, |
| 19 /// runs transformations on them, and then tracks which sources have been | 20 /// runs transformations on them, and then tracks which sources have been |
| 20 /// modified and which transformations need to be re-run. | 21 /// modified and which transformations need to be re-run. |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 /// | 82 /// |
| 82 /// Begins applying any transforms that can consume any of the sources. If a | 83 /// Begins applying any transforms that can consume any of the sources. If a |
| 83 /// given source is already known, it is considered modified and all | 84 /// given source is already known, it is considered modified and all |
| 84 /// transforms that use it will be re-applied. | 85 /// transforms that use it will be re-applied. |
| 85 void updateSources(Iterable<AssetId> sources) => | 86 void updateSources(Iterable<AssetId> sources) => |
| 86 _graph.updateSources(sources); | 87 _graph.updateSources(sources); |
| 87 | 88 |
| 88 /// Removes [removed] from the graph's known set of source assets. | 89 /// Removes [removed] from the graph's known set of source assets. |
| 89 void removeSources(Iterable<AssetId> removed) => | 90 void removeSources(Iterable<AssetId> removed) => |
| 90 _graph.removeSources(removed); | 91 _graph.removeSources(removed); |
| 92 |
| 93 /// Gets all output assets. |
| 94 /// |
| 95 /// If a build is currently in progress, waits until it completes. The |
| 96 /// returned future will complete with a [BarbackException] if the build is |
| 97 /// not successful. |
| 98 Future<AssetSet> getAllAssets() => _graph.getAllAssets(); |
| 91 } | 99 } |
| OLD | NEW |