createFileExport method

void createFileExport(
  1. Map morphemeAssets
)

Implementation

void createFileExport(Map morphemeAssets) {
  final items = find(
    '[a-z]*.*',
    workingDirectory: join(current, morphemeAssets.outputDir, 'src'),
    recursive: false,
  ).toList();

  final pathOutput = join(current, morphemeAssets.outputDir, 'assets.dart');

  pathOutput.write('library assets;\n');

  for (var item in items) {
    final nameWithExtension = item.split('/').last;
    pathOutput.append("export 'src/$nameWithExtension';");
  }

  StatusHelper.generated(pathOutput);
}