Add css bundle download for mods

This commit is contained in:
smartfridge 2022-12-25 20:47:25 +01:00
parent 334d28542f
commit f9dbd884b3

View file

@ -310,8 +310,15 @@ async function updateModBundle() {
cordwood: "https://raw.githubusercontent.com/Cordwood/builds/master/index.js",
shelter: "https://raw.githubusercontent.com/uwu/shelter-builds/main/shelter.js"
};
const clientModsCss = {
vencord: "https://github.com/Vendicated/Vencord/releases/download/devbuild/browser.css",
cordwood: "https://armcord.xyz/placeholder.css",
shelter: "https://armcord.xyz/placeholder.css"
};
var bundle: string = await (await fetch(clientMods[name as keyof typeof clientMods])).text();
fs.writeFileSync(distFolder + "bundle.js", bundle, "utf-8");
var css: string = await (await fetch(clientModsCss[name as keyof typeof clientModsCss])).text();
fs.writeFileSync(distFolder + "bundle.css", css, "utf-8");
} catch (e) {
console.log("[Mod loader] Failed to install mods");
console.error(e);