createCommand top-level property
Implementation
final FigSubcommand createCommand = FigSubcommand(
name: ['create'],
description:
'Create a new Nativescript project. Press Enter for an interactive walkthrough',
args: [
FigArg(
name: 'application name',
description: 'The name of the Nativescript project',
isOptional: true)
],
options: [
FigOption(
name: ['--template'],
description: 'Create a project using a predefined template',
args: [
FigArg(
name: 'template',
// Note: Generator logic omitted for brevity/complexity in manual conversion.
// Consider implementing if needed.
),
],
),
FigOption(
name: ['--angular', '--ng'],
description: 'Create a project using the Angular template'),
FigOption(
name: ['--react'],
description: 'Create a project using the React template'),
FigOption(
name: ['--vue', '--vuejs'],
description: 'Create a project using the Vue template'),
FigOption(
name: ['--svelte'],
description: 'Create a project using the Svelte template'),
FigOption(
name: ['--typescript', '--tsc', '--ts'],
description: 'Create a project using plain TypeScript'),
FigOption(
name: ['--javascript', '--js'],
description: 'Create a project using plain JavaScript'),
FigOption(
name: ['--path'],
description:
'Specifies the directory where you want to create the project, if different from the current directory. <directory> is the absolute path to an empty directory in which you want to create the project',
priority: 10,
args: [FigArg(name: 'directory', template: 'folders')],
),
FigOption(
name: ['--appid'],
description:
'Sets the application identifier of your project. <appid> is the value of the application identifier and it must meet the specific requirements of each platform that you want to target. If not specified, the application identifier is set to org.nativescript.<Project Name>. The application identifier must be a domain name in reverse',
args: [FigArg(name: 'identifier')],
),
helpOption('create'),
],
);