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

Unified Diff: pkg/barback/lib/src/asset_provider.dart

Issue 16854005: First pass at build dependency graph for barback. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Handle unprovided sources and errors a bit better. Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/barback/lib/src/asset_node.dart ('k') | pkg/barback/lib/src/change_batch.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/barback/lib/src/asset_provider.dart
diff --git a/pkg/barback/lib/src/asset_provider.dart b/pkg/barback/lib/src/asset_provider.dart
new file mode 100644
index 0000000000000000000000000000000000000000..565e5ac70b30d934e0f6e8c8a9922645e8be6729
--- /dev/null
+++ b/pkg/barback/lib/src/asset_provider.dart
@@ -0,0 +1,32 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library barback.asset_provider;
+
+import 'dart:async';
+
+import 'asset.dart';
+import 'asset_id.dart';
+
+/// API for locating and accessing packages on disk.
+///
+/// Implemented by pub and provided to barback so that it isn't coupled
+/// directly to pub.
+abstract class AssetProvider {
+ /// The names of all packages that can be provided by this provider.
+ ///
+ /// This is equal to the transitive closure of the entrypoint package
+ /// dependencies.
+ Iterable<String> get packages;
+
+ // TODO(rnystrom): Make this async.
+ /// The paths of all available asset files in [package], relative to the
+ /// package's root directory.
+ ///
+ /// You can pass [within], which should be the relative path to a directory
+ /// within the package, to only return the files within that subdirectory.
+ List<AssetId> listAssets(String package, {String within});
+
+ Future<Asset> getAsset(AssetId id);
+}
« no previous file with comments | « pkg/barback/lib/src/asset_node.dart ('k') | pkg/barback/lib/src/change_batch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698