build method

  1. @override
Future<void> build(
  1. BuildStep buildStep
)

Generates the outputs for a given BuildStep.

Implementation

@override
Future<void> build(BuildStep buildStep) async {
  log.info('Loading ${buildStep.inputId.path}');
  final yamlData = await buildStep.readAsString(buildStep.inputId);
  final output = convertPubspec(yamlData, options);
  await buildStep.writeAsString(buildStep.allowedOutputs.first, output);
}