GenerateFromArgsCommand constructor

GenerateFromArgsCommand({
  1. required FigmaService figmaApi,
  2. required ParserService parser,
  3. required WriterService writer,
  4. required CodeGeneratorService generator,
  5. required LoggerService logger,
})

Implementation

GenerateFromArgsCommand({
  required this.figmaApi,
  required this.parser,
  required this.writer,
  required this.generator,
  required this.logger,
}) {
  argParser.addOption(
    'fileId',
    mandatory: true,
    help: 'The id of the figma file, can be found in the URL.',
  );
  argParser.addOption(
    'token',
    mandatory: true,
    help: 'Your Figma personal access token.',
  );
  argParser.addOption(
    'jsonOutputFile',
    mandatory: false,
    help:
        'Optional filepath to the raw response from figma, mostly used for debugging.',
  );
  argParser.addOption(
    'dartOutputFolder',
    mandatory: false,
    defaultsTo: 'lib/gen',
    help:
        'Folder location for the generated Dart files, defaults to lib/gen.',
  );
  argParser.addMultiOption(
    'collectionOverrides',
    defaultsTo: [],
    help: 'Optional comma-separated overrides.',
  );
  argParser.addMultiOption(
    'variableOverrides',
    defaultsTo: [],
  );
  argParser.addMultiOption(
    'excludedCollections',
    defaultsTo: [],
    help: 'Optional comma-separated list of collections to exclude',
  );
}