CreatePackage constructor
CreatePackage({
- required GgLog ggLog,
Constructor
Implementation
CreatePackage({required this.ggLog}) {
// Add the output option
argParser.addOption(
'output',
abbr: 'o',
help: 'Output directory',
defaultsTo: '.',
);
// Add the package name option
argParser.addOption(
'name',
abbr: 'n',
help: 'Package name',
mandatory: true,
);
// Add the package name option
argParser.addOption(
'description',
abbr: 'd',
help: 'Package description. Minimum 60 chars long.',
mandatory: true,
);
// Add the isOpenSource option
argParser.addFlag(
'open-source',
abbr: 's',
help: 'Is the package open source?',
negatable: true,
);
// Add the githubOrg option
argParser.addOption(
'github-org',
abbr: 'g',
help: 'The GitHub organization to use.',
mandatory: true,
);
// Add the push repo option
argParser.addFlag(
'prepare-github',
abbr: 'p',
help: 'Prepares pushing the repo to GitHub.',
negatable: true,
defaultsTo: true,
);
// Force recreation
argParser.addFlag(
'force',
abbr: 'f',
help: 'Force recreation. Existing package will be deleted.',
negatable: true,
defaultsTo: false,
);
// Add the cli option
argParser.addFlag(
'cli',
abbr: 'c',
help: 'Do (not) create a command line interface.',
negatable: true,
defaultsTo: true,
);
// Add the example option
argParser.addFlag(
'example',
abbr: 'e',
help: 'Do (not) create an example.',
negatable: true,
defaultsTo: true,
);
// Add the example option
argParser.addFlag(
'flutter',
abbr: 'l',
help: 'Create a flutter package',
negatable: false,
defaultsTo: false,
);
// Add dry-run option
argParser.addFlag(
'dry-run',
help: 'Do not execute the command.',
negatable: true,
defaultsTo: false,
);
}