mirror of
https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
synced 2026-12-01 02:52:49 +08:00
13 lines
580 B
JavaScript
13 lines
580 B
JavaScript
import { readFile, writeFile } from "node:fs/promises";
|
|
import { fileURLToPath } from "node:url";
|
|
import { zipSync } from "fflate";
|
|
|
|
const sourceDirectory = new URL("../../docs/examples/open-voice-surface/", import.meta.url);
|
|
const outputPath = fileURLToPath(new URL("../../docs/examples/open-voice-surface.wskin", import.meta.url));
|
|
const files = Object.fromEntries(await Promise.all(["manifest.json", "components.json", "skin.css"].map(async (name) => [
|
|
name,
|
|
await readFile(new URL(name, sourceDirectory)),
|
|
])));
|
|
|
|
await writeFile(outputPath, zipSync(files, { level: 9 }));
|