mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 18:57:03 +02:00
12 lines
331 B
TypeScript
12 lines
331 B
TypeScript
import { readFile } from 'fs/promises';
|
|
import { DATA_COMPRESSED } from '../../buildAssets/constants';
|
|
import { readDVPL } from './readDVPL';
|
|
|
|
export async function readDVPLFile(file: string) {
|
|
if (DATA_COMPRESSED && !file.endsWith('.dvpl')) {
|
|
return readDVPL(await readFile(`${file}.dvpl`));
|
|
}
|
|
|
|
return readFile(file);
|
|
}
|