runBuildRunner static method

Future<void> runBuildRunner({
  1. required Directory projectRoot,
})

Run build_runner in the given projectRoot directory after feature generation.

Implementation

static Future<void> runBuildRunner({required Directory projectRoot}) async {
  stdout.writeln('\nāš™ Running build_runner...');

  try {
    await PostCreateCodegen.runBuildRunner(projectRoot.path);
  } on Exception catch (error) {
    stderr.writeln('āŒ build_runner failed');
    stderr.writeln(error);
    return;
  }

  stdout.writeln('āœ… build_runner completed');
}