tweaks to the cli args for flutter run (#13207)

This commit is contained in:
Devon Carew 2017-11-27 06:56:51 -08:00 committed by GitHub
parent bdbe53be01
commit d776f64f4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,13 +25,11 @@ abstract class RunCommandBase extends FlutterCommand {
addBuildModeFlags(defaultToRelease: false); addBuildModeFlags(defaultToRelease: false);
usesFlavorOption(); usesFlavorOption();
argParser.addFlag('trace-startup', argParser.addFlag('trace-startup',
negatable: true, negatable: false,
defaultsTo: false,
help: 'Start tracing during startup.'); help: 'Start tracing during startup.');
argParser.addFlag('ipv6', argParser.addFlag('ipv6',
hide: true, hide: true,
negatable: false, negatable: false,
defaultsTo: false,
help: 'Binds to IPv6 localhost instead of IPv4 when the flutter tool\n' help: 'Binds to IPv6 localhost instead of IPv4 when the flutter tool\n'
'forwards the host port to a device port.'); 'forwards the host port to a device port.');
argParser.addOption('route', argParser.addOption('route',
@ -79,24 +77,20 @@ class RunCommand extends RunCommandBase {
defaultsTo: true, defaultsTo: true,
help: 'Stop any currently running application process before running the app.'); help: 'Stop any currently running application process before running the app.');
argParser.addFlag('start-paused', argParser.addFlag('start-paused',
defaultsTo: false,
negatable: false, negatable: false,
help: 'Start in a paused mode and wait for a debugger to connect.'); help: 'Start in a paused mode and wait for a debugger to connect.');
argParser.addFlag('enable-software-rendering', argParser.addFlag('enable-software-rendering',
defaultsTo: false,
negatable: false, negatable: false,
help: 'Enable rendering using the Skia software backend. This is useful\n' help: 'Enable rendering using the Skia software backend. This is useful\n'
'when testing Flutter on emulators. By default, Flutter will\n' 'when testing Flutter on emulators. By default, Flutter will\n'
'attempt to either use OpenGL or Vulkan and fall back to software\n' 'attempt to either use OpenGL or Vulkan and fall back to software\n'
'when neither is available.'); 'when neither is available.');
argParser.addFlag('trace-skia', argParser.addFlag('trace-skia',
defaultsTo: false,
negatable: false, negatable: false,
help: 'Enable tracing of Skia code. This is useful when debugging\n' help: 'Enable tracing of Skia code. This is useful when debugging\n'
'the GPU thread. By default, Flutter will not log skia code.'); 'the GPU thread. By default, Flutter will not log skia code.');
argParser.addFlag('use-test-fonts', argParser.addFlag('use-test-fonts',
negatable: true, negatable: true,
defaultsTo: false,
help: 'Enable (and default to) the "Ahem" font. This is a special font\n' help: 'Enable (and default to) the "Ahem" font. This is a special font\n'
'used in tests to remove any dependencies on the font metrics. It\n' 'used in tests to remove any dependencies on the font metrics. It\n'
'is enabled when you use "flutter test". Set this flag when running\n' 'is enabled when you use "flutter test". Set this flag when running\n'
@ -110,10 +104,10 @@ class RunCommand extends RunCommandBase {
help: 'Specify a pre-built application binary to use when running.'); help: 'Specify a pre-built application binary to use when running.');
argParser.addFlag('preview-dart-2', argParser.addFlag('preview-dart-2',
hide: !verboseHelp, hide: !verboseHelp,
defaultsTo: false,
help: 'Preview Dart 2.0 functionality.'); help: 'Preview Dart 2.0 functionality.');
argParser.addOption('packages', argParser.addOption('packages',
hide: !verboseHelp, hide: !verboseHelp,
valueHelp: 'path',
help: 'Specify the path to the .packages file.'); help: 'Specify the path to the .packages file.');
argParser.addOption('project-root', argParser.addOption('project-root',
hide: !verboseHelp, hide: !verboseHelp,
@ -123,8 +117,9 @@ class RunCommand extends RunCommandBase {
help: 'Specify the project assets relative to the root directory.'); help: 'Specify the project assets relative to the root directory.');
argParser.addFlag('machine', argParser.addFlag('machine',
hide: !verboseHelp, hide: !verboseHelp,
help: 'Handle machine structured JSON command input\n' negatable: false,
'and provide output and progress in machine friendly format.'); help: 'Handle machine structured JSON command input and provide output\n'
'and progress in machine friendly format.');
argParser.addFlag('hot', argParser.addFlag('hot',
negatable: true, negatable: true,
defaultsTo: kHotReloadDefault, defaultsTo: kHotReloadDefault,