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

Unified Diff: sdk/lib/_internal/pub_generated/lib/src/command/list_package_dirs.dart

Issue 557563002: Store the async-await compiled pub code directly in the repo. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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
Index: sdk/lib/_internal/pub_generated/lib/src/command/list_package_dirs.dart
diff --git a/sdk/lib/_internal/pub/lib/src/command/list_package_dirs.dart b/sdk/lib/_internal/pub_generated/lib/src/command/list_package_dirs.dart
similarity index 65%
copy from sdk/lib/_internal/pub/lib/src/command/list_package_dirs.dart
copy to sdk/lib/_internal/pub_generated/lib/src/command/list_package_dirs.dart
index 87c3a6987b26c2fba57a6792a8976f77d46c7231..128ee925fbf51a3044a9edffb0043ba048d09cac 100644
--- a/sdk/lib/_internal/pub/lib/src/command/list_package_dirs.dart
+++ b/sdk/lib/_internal/pub_generated/lib/src/command/list_package_dirs.dart
@@ -1,39 +1,25 @@
-// 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 pub.command.list_package_dirs;
-
import 'dart:async';
-
import 'package:path/path.dart' as path;
-
import '../command.dart';
import '../log.dart' as log;
import '../utils.dart';
-
-/// Handles the `list-package-dirs` pub command.
class ListPackageDirsCommand extends PubCommand {
String get description => "Print local paths to dependencies.";
String get usage => "pub list-package-dirs";
bool get hidden => true;
-
ListPackageDirsCommand() {
- commandParser.addOption("format",
+ commandParser.addOption(
+ "format",
help: "How output should be displayed.",
allowed: ["json"]);
}
-
Future onRun() {
log.json.enabled = true;
-
if (!entrypoint.lockFileExists) {
dataError('Package "myapp" has no lockfile. Please run "pub get" first.');
}
-
var output = {};
-
- // Include the local paths to all locked packages.
var packages = {};
var futures = [];
entrypoint.lockFile.packages.forEach((name, package) {
@@ -42,22 +28,11 @@ class ListPackageDirsCommand extends PubCommand {
packages[name] = path.join(packageDir, "lib");
}));
});
-
output["packages"] = packages;
-
- // Include the self link.
packages[entrypoint.root.name] = path.join(entrypoint.root.dir, "lib");
-
- // Include the file(s) which when modified will affect the results. For pub,
- // that's just the pubspec and lockfile.
- output["input_files"] = [
- entrypoint.lockFilePath,
- entrypoint.pubspecPath
- ];
-
+ output["input_files"] = [entrypoint.lockFilePath, entrypoint.pubspecPath];
return Future.wait(futures).then((_) {
log.json.message(output);
});
}
}
-

Powered by Google App Engine
This is Rietveld 408576698