Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(309)

Side by Side Diff: pkg/barback/lib/src/asset_cascade.dart

Issue 22824023: Start sketching out a buildAll() method. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise. Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/barback/lib/barback.dart ('k') | pkg/barback/lib/src/barback.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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.asset_cascade; 5 library barback.asset_cascade;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 9
10 import 'asset.dart'; 10 import 'asset.dart';
11 import 'asset_id.dart'; 11 import 'asset_id.dart';
12 import 'asset_node.dart'; 12 import 'asset_node.dart';
13 import 'asset_set.dart';
13 import 'build_result.dart'; 14 import 'build_result.dart';
14 import 'cancelable_future.dart'; 15 import 'cancelable_future.dart';
15 import 'errors.dart'; 16 import 'errors.dart';
16 import 'package_graph.dart'; 17 import 'package_graph.dart';
17 import 'phase.dart'; 18 import 'phase.dart';
18 import 'transformer.dart'; 19 import 'transformer.dart';
19 import 'utils.dart'; 20 import 'utils.dart';
20 21
21 /// The asset cascade for an individual package. 22 /// The asset cascade for an individual package.
22 /// 23 ///
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 76
76 /// A future that completes when the currently running build process finishes. 77 /// A future that completes when the currently running build process finishes.
77 /// 78 ///
78 /// If no build it in progress, is `null`. 79 /// If no build it in progress, is `null`.
79 Future _processDone; 80 Future _processDone;
80 81
81 /// Whether any source assets have been updated or removed since processing 82 /// Whether any source assets have been updated or removed since processing
82 /// last began. 83 /// last began.
83 var _newChanges = false; 84 var _newChanges = false;
84 85
86 /// Returns all currently-available output assets from this cascade.
87 AssetSet get availableOutputs => _phases.last.availableOutputs;
88
85 /// Creates a new [AssetCascade]. 89 /// Creates a new [AssetCascade].
86 /// 90 ///
87 /// It loads source assets within [package] using [provider]. 91 /// It loads source assets within [package] using [provider].
88 AssetCascade(this.graph, this.package) { 92 AssetCascade(this.graph, this.package) {
89 _addPhase(new Phase(this, [])); 93 _addPhase(new Phase(this, []));
90 } 94 }
91 95
92 /// Gets the asset identified by [id]. 96 /// Gets the asset identified by [id].
93 /// 97 ///
94 /// If [id] is for a generated or transformed asset, this will wait until it 98 /// If [id] is for a generated or transformed asset, this will wait until it
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 260
257 // Otherwise, everything is done. 261 // Otherwise, everything is done.
258 return; 262 return;
259 } 263 }
260 264
261 // Process that phase and then loop onto the next. 265 // Process that phase and then loop onto the next.
262 return future.then((_) => _process()); 266 return future.then((_) => _process());
263 }); 267 });
264 } 268 }
265 } 269 }
OLDNEW
« no previous file with comments | « pkg/barback/lib/barback.dart ('k') | pkg/barback/lib/src/barback.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698