Add back build/serve argparser options (#1892)
Closes #1891
Restore the options that used to exist but mark them all as hidden.
diff --git a/lib/src/command/barback.dart b/lib/src/command/barback.dart
index f7d4b7d..e90e493 100644
--- a/lib/src/command/barback.dart
+++ b/lib/src/command/barback.dart
@@ -8,6 +8,12 @@
/// Shared base class for [BuildCommand] and [ServeCommand].
abstract class BarbackCommand extends PubCommand {
+ BarbackCommand() {
+ argParser.addOption("mode", hide: true);
+ argParser.addFlag("all", hide: true);
+ argParser.addOption("web-compiler", hide: true);
+ }
+
run() {
// Switch to JSON output if specified. We need to do this before parsing
// the source directories so an error will be correctly reported in JSON
diff --git a/lib/src/command/build.dart b/lib/src/command/build.dart
index 40ee4cd..5013ec3 100644
--- a/lib/src/command/build.dart
+++ b/lib/src/command/build.dart
@@ -9,4 +9,10 @@
String get name => "build";
String get description => "Deprecated command";
bool get hidden => true;
+
+ BuildCommand() {
+ argParser.addOption("define", hide: true);
+ argParser.addOption("format", hide: true);
+ argParser.addOption("output", hide: true);
+ }
}
diff --git a/lib/src/command/serve.dart b/lib/src/command/serve.dart
index 79d6ead..45e55ea 100644
--- a/lib/src/command/serve.dart
+++ b/lib/src/command/serve.dart
@@ -9,4 +9,15 @@
String get name => "serve";
String get description => "Deprecated command";
bool get hidden => true;
+
+ ServeCommand() {
+ argParser.addOption("define", hide: true);
+ argParser.addOption('hostname', hide: true);
+ argParser.addOption('port', hide: true);
+ argParser.addFlag('log-admin-url', hide: true);
+ argParser.addOption('admin-port', hide: true);
+ argParser.addOption('build-delay', hide: true);
+ argParser.addFlag('dart2js', hide: true);
+ argParser.addFlag('force-poll', hide: true);
+ }
}