createDartExportFile function

void createDartExportFile(
  1. List<String> exportPaths
)

Generates the export file with the TKeys and TData files.

Implementation

void createDartExportFile(List<String> exportPaths) {
  final dir = config.dartOutputDir;
  exportPaths.sort();
  var fileContents = exportPaths
      .map((path) => 'export "${p.relative(path, from: dir)}";')
      .join('\n');
  var exportFilePath = p.join(dir, '${p.basename(dir)}.dart');

  /// export the file.
  saveString(exportFilePath, fileContents);
}