Files
blitzkit/packages/scripts/src/core/blitz/readDVPLFile.ts
T

11 lines
331 B
TypeScript
Raw Normal View History

2023-12-09 15:56:25 -06:00
import { readFile } from 'fs/promises';
2025-01-14 19:22:41 -06:00
import { DATA_COMPRESSED } from '../../buildAssets/constants';
2023-12-09 15:56:25 -06:00
import { readDVPL } from './readDVPL';
export async function readDVPLFile(file: string) {
2025-01-17 19:17:39 -06:00
if (DATA_COMPRESSED && !file.endsWith('.dvpl')) {
2025-01-14 19:22:41 -06:00
return readDVPL(await readFile(`${file}.dvpl`));
}
return readFile(file);
2023-12-09 15:56:25 -06:00
}