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

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

Issue 21275003: Move barback to a more event-based model. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes. 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/src/asset_node.dart ('k') | pkg/barback/lib/src/phase.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.package_provider; 5 library barback.package_provider;
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 'transformer.dart'; 11 import 'transformer.dart';
12 12
13 /// API for locating and accessing packages on disk. 13 /// API for locating and accessing packages on disk.
14 /// 14 ///
15 /// Implemented by pub and provided to barback so that it isn't coupled 15 /// Implemented by pub and provided to barback so that it isn't coupled
16 /// directly to pub. 16 /// directly to pub.
17 abstract class PackageProvider { 17 abstract class PackageProvider {
18 /// The names of all packages that can be provided by this provider. 18 /// The names of all packages that can be provided by this provider.
19 /// 19 ///
20 /// This is equal to the transitive closure of the entrypoint package 20 /// This is equal to the transitive closure of the entrypoint package
21 /// dependencies. 21 /// dependencies.
22 Iterable<String> get packages; 22 Iterable<String> get packages;
23 23
24 /// Returns the list of transformer phases that are applicable to [package]. 24 /// Returns the list of transformer phases that are applicable to [package].
25 /// 25 ///
26 /// The phases will be run in sequence, with the outputs of one pipelined into 26 /// The phases will be run in sequence, with the outputs of one pipelined into
27 /// the next. All [Transformer]s in a single phase will be run in parallel. 27 /// the next. All [Transformer]s in a single phase will be run in parallel.
28 Iterable<Iterable<Transformer>> getTransformers(String package); 28 Iterable<Iterable<Transformer>> getTransformers(String package);
29 29
30 /// Loads an asset from disk.
31 ///
32 /// This should be re-entrant; it may be called multiple times with the same
33 /// id before the previously returned future has completed.
30 Future<Asset> getAsset(AssetId id); 34 Future<Asset> getAsset(AssetId id);
31 } 35 }
OLDNEW
« no previous file with comments | « pkg/barback/lib/src/asset_node.dart ('k') | pkg/barback/lib/src/phase.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698