DevforgeConfig.load constructor

DevforgeConfig.load()

Load config from devforge.yaml

Implementation

factory DevforgeConfig.load() {
  final file = File('devforge.yaml');

  final yamlString = file.readAsStringSync();
  final yamlMap = loadYaml(yamlString);

  final config = yamlMap?['devforge'];

  return DevforgeConfig(
    inputPath: config != null ? InputPath.fromYaml(config['input_path']) : null,
    outputPath: config != null ? OutputPath.fromYaml(config['output_path']) : null,
  );
}