BarrelerRunner constructor

BarrelerRunner({
  1. required Logger logger,
  2. required FileSystem fs,
  3. required KeyPressListener keyPressListener,
  4. required PubUpdater pubUpdater,
  5. required FindSettings findSettings,
})

Implementation

BarrelerRunner({
  required this.logger,
  required FileSystem fs,
  required KeyPressListener keyPressListener,
  required PubUpdater pubUpdater,
  required FindSettings findSettings,
}) : super(
        'barreler',
        'A Dart package to generate barrel files for your directories.',
      ) {
  addCommand(
    BuildCommand(
      fs: fs,
      logger: logger,
      settings: findSettings,
    ),
  );
  addCommand(
    WatchCommand(
      fs: fs,
      logger: logger,
      settings: findSettings,
      keyPressListener: keyPressListener,
    ),
  );
  addCommand(
    updateCommand = UpdateCommand(
      logger: logger,
      pubUpdater: pubUpdater,
    ),
  );

  addCommand(
    ExampleCommand(
      fileSystem: fs,
      logger: logger,
    ),
  );

  argParser
    ..addFlag(
      'version',
      defaultsTo: false,
      negatable: false,
      help: 'Print the current version of barreler.',
    )
    ..addFlag(
      'loud',
      defaultsTo: false,
      negatable: false,
      help: 'Print verbose logs',
    )
    ..addFlag(
      'quiet',
      defaultsTo: false,
      negatable: false,
      help: 'Prints no logs',
    )
    ..addFlag(
      'version-check',
      defaultsTo: true,
      help: 'Do not check for new versions of sip_cli',
    );
}