sakeSpec top-level property
Implementation
final FigSpec sakeSpec = FigSpec(
name: 'sake',
description:
'🍶 Swift-based utility for managing project commands, inspired by Make',
subcommands: [
FigSubcommand(
name: 'init',
description:
'Initialize a new SakeApp project template for defining commands',
options: [...commonOptions],
),
FigSubcommand(
name: 'clean',
description:
'Remove all build artifacts generated by the SakeApp to ensure a clean state for future builds',
options: [...commonOptions],
),
FigSubcommand(
name: 'edit',
description: 'Open the SakeApp in Xcode (macOS only)',
options: [...commonOptions],
),
FigSubcommand(
name: 'list',
description: 'List all available commands defined in the SakeApp',
options: [
...commonOptions,
...commonCommandSpecificOptions,
FigOption(
name: ['--json', '-j'],
description: 'Output the list of commands in JSON format',
priority: 45,
),
],
),
FigSubcommand(
name: 'build',
description: 'Manually trigger a rebuild of the SakeApp',
options: [
...commonOptions,
FigOption(
name: ['--show-bin-path'],
description: 'Print the path to the built SakeApp executable',
priority: 45,
),
],
),
FigSubcommand(
name: 'run',
description: 'Run the specified command from the SakeApp',
args: [
FigArg(
name: 'command',
description: 'The command to run',
generators: [
FigGenerator(
script: ['sake', 'list', '--json'],
postProcess: _sakeRunPostProcess,
),
],
),
],
options: [...commonOptions, ...commonCommandSpecificOptions],
),
],
options: [
FigOption(
name: ['--help', '-h'],
description: 'Show help information',
isPersistent: true,
priority: 40,
),
FigOption(
name: ['--version'],
description: 'Show the version',
priority: 40,
),
],
);