Files
VOREStation/tools/build/lib/tgs.ts
T
Kashargul 9c71c3bb4f Yarn to bun migration port (#17887)
* Yarn to bun migration port

* .

* .

* .

* .

* .

* .

* .

* missed that

* ...

* can't have those

* end of compat

* port tg 91703

* we need to accept the eula

* make sure to use basic

* -f as JL suggested

* Update dependencies.sh

* push

---------

Co-authored-by: Selis <12716288+ItsSelis@users.noreply.github.com>
2025-06-28 02:50:36 +02:00

16 lines
471 B
TypeScript

import { DME_NAME } from "../build";
/**
* Prepends the defines to the .dme.
* Does not clean them up, as this is intended for TGS which
* clones new copies anyway.
*/
export async function prependDefines(...defines: string[]): Promise<void> {
const file = Bun.file(`${DME_NAME}.dme`);
const dmeContents = await file.text();
const textToWrite = defines.map((define) => `#define ${define}\n`);
await file.write(`${textToWrite.join("")}\n${dmeContents}`);
}