mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-22 03:07:04 +02:00
feat: some sketchy code
This commit is contained in:
1 parent
2a4375c718
commit
ad2aaa7bf8
5 files changed
+28
-26
No files matched your search
@@ -1,11 +1,10 @@
|
||||
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`));
|
||||
}
|
||||
const path = `${file}${file.endsWith('.dvpl') ? '' : '.dvpl'}`;
|
||||
const content = await readFile(path);
|
||||
const dvpl = readDVPL(content);
|
||||
|
||||
return readFile(file);
|
||||
return dvpl;
|
||||
}
|
||||
Reference in new issue
Block a user