GenerateCommand constructor
GenerateCommand()
Creates the parser. We declare every option ourselves rather than inheriting from a shared base because the doctor/migrate commands have a distinct (smaller) flag surface.
Implementation
GenerateCommand() {
argParser
..addOption(
'file',
abbr: 'f',
help:
'Path to a config file '
'(overrides the default search order).',
)
..addOption(
'prefix',
abbr: 'p',
help: 'Project prefix path. Defaults to the current directory.',
defaultsTo: '.',
)
..addMultiOption(
'flavor',
help: 'Build only the named flavor. Repeat to build multiple.',
valueHelp: 'name',
)
..addFlag(
'all-flavors',
help: 'Build every flavor defined by the consolidated config.',
negatable: false,
)
..addFlag(
'list-flavors',
help: 'Print discovered flavors and exit without generating.',
negatable: false,
)
..addFlag(
'continue-on-error',
help:
'When generating multiple flavors, log per-flavor failures '
'and continue. Exits 1 with a summary if any failed.',
negatable: false,
)
..addFlag(
'strict',
help:
'Treat the new+legacy config coexistence warning as a fatal '
'error (exit 65).',
negatable: false,
)
..addFlag(
'yes',
abbr: 'y',
help:
'Assume "yes" to the non-square-source squish confirmation '
'prompt. Equivalent to setting `non_square_image_ok: true` '
'in config.',
negatable: false,
)
..addFlag(
'verbose',
abbr: 'v',
help: 'Enable verbose logging.',
negatable: false,
);
}