build function

Future<void> build(
  1. IShell shell, [
  2. String? config
])

Builds the Dart source files for the current dart project

since 0.0.1

Implementation

Future<void> build(IShell shell, [String? config]) async {
  await _whenDartBuildable('Build', shell, () async {
    _log.info('Building $config'.trim());
    var configFlag = config != null ? '--config $config' : '';
    await shell.run(
      '''
        dart run build_runner build \\
          --delete-conflicting-outputs \\
          $configFlag
        '''
          .trim(),
    );
  });
}