parseResources function

Resources parseResources(
  1. Config arguments
)

Implementation

Resources parseResources(Config arguments) {
  final pubspecFile = File(arguments.pubspecFilename).absolute;
  if (!pubspecFile.existsSync()) {
    exit(1);
  }

  final yaml = loadYaml(pubspecFile.readAsStringSync()) as YamlMap;

  return Resources(
    fonts: parseFonts(yaml),
    assets: parseAssets(yaml, arguments.ignoreAssets, arguments.assetClasses),
    i18n: parseStrings(arguments.intlFilename),
  );
}