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

Unified Diff: sdk/lib/_internal/pub/lib/src/command/build.dart

Issue 805393002: Update pub to use the new command runner API in args. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes Created 5 years, 11 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/lib/src/command/build.dart
diff --git a/sdk/lib/_internal/pub/lib/src/command/build.dart b/sdk/lib/_internal/pub/lib/src/command/build.dart
index f1f6625d0e94b690e7b1ecede793e92abc97e334..4b76909f9dae02de7ac68cd3b68556611a445909 100644
--- a/sdk/lib/_internal/pub/lib/src/command/build.dart
+++ b/sdk/lib/_internal/pub/lib/src/command/build.dart
@@ -20,13 +20,14 @@ final _arrow = getSpecial('\u2192', '=>');
/// Handles the `build` pub command.
class BuildCommand extends BarbackCommand {
+ String get name => "build";
String get description => "Apply transformers to build a package.";
- String get usage => "pub build [options] [directories...]";
+ String get invocation => "pub build [options] [directories...]";
String get docUrl => "http://dartlang.org/tools/pub/cmd/pub-build.html";
List<String> get aliases => const ["deploy", "settle-up"];
/// The path to the application's build output directory.
- String get outputDirectory => commandOptions["output"];
+ String get outputDirectory => argResults["output"];
List<String> get defaultSourceDirectories => ["web"];
@@ -34,11 +35,11 @@ class BuildCommand extends BarbackCommand {
int builtFiles = 0;
BuildCommand() {
- commandParser.addOption("format",
+ argParser.addOption("format",
help: "How output should be displayed.",
allowed: ["text", "json"], defaultsTo: "text");
- commandParser.addOption("output", abbr: "o",
+ argParser.addOption("output", abbr: "o",
help: "Directory to write build outputs to.",
defaultsTo: "build");
}
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/command/barback.dart ('k') | sdk/lib/_internal/pub/lib/src/command/cache.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698