Hide flutter run_mojo

This commit is contained in:
Eric Seidel 2016-02-16 15:23:20 -08:00
parent 2be0dfd6a0
commit f784fb8ce6
3 changed files with 8 additions and 6 deletions

View file

@ -54,7 +54,7 @@ Future main(List<String> args) async {
..addCommand(new LogsCommand())
..addCommand(new RefreshCommand())
..addCommand(new RunCommand())
..addCommand(new RunMojoCommand())
..addCommand(new RunMojoCommand(hideCommand: !verboseHelp))
..addCommand(new StopCommand())
..addCommand(new TestCommand())
..addCommand(new TraceCommand())

View file

@ -28,15 +28,15 @@ const String protocolVersion = '0.1.0';
/// It can be shutdown with a `daemon.shutdown` command (or by killing the
/// process).
class DaemonCommand extends FlutterCommand {
DaemonCommand({ this.hideCommand: false });
DaemonCommand({ bool hideCommand: false }) : _hideCommand = hideCommand;
final String name = 'daemon';
final String description = 'Run a persistent, JSON-RPC based server to communicate with devices.';
final bool hideCommand;
final bool _hideCommand;
bool get requiresProjectRoot => false;
bool get hidden => hideCommand;
bool get hidden => _hideCommand;
Future<int> runInProject() {
printStatus('Starting device daemon...');

View file

@ -19,9 +19,10 @@ const String _kDefaultBundlePath = 'build/app.flx';
class RunMojoCommand extends FlutterCommand {
final String name = 'run_mojo';
final String description = 'Run a Flutter app in mojo.';
final String description = 'Run a Flutter app in mojo (from github.com/domokit/mojo).';
final bool _hideCommand;
RunMojoCommand() {
RunMojoCommand({ hideCommand: false }) : _hideCommand = hideCommand {
argParser.addFlag('android', negatable: false, help: 'Run on an Android device');
argParser.addFlag('checked', negatable: false, help: 'Run Flutter in checked mode');
argParser.addFlag('mojo-debug', negatable: false, help: 'Use Debug build of mojo');
@ -37,6 +38,7 @@ class RunMojoCommand extends FlutterCommand {
}
bool get requiresProjectRoot => false;
bool get hidden => _hideCommand;
// TODO(abarth): Why not use path.absolute?
String _makePathAbsolute(String relativePath) {