mirror of
https://github.com/Equicord/Equicord.git
synced 2025-01-18 21:33:35 -05:00
Update compiler.ts
This commit is contained in:
parent
cf889331e7
commit
f349b19a31
1 changed files with 6 additions and 2 deletions
|
@ -18,7 +18,7 @@ const preprocessors: { [preprocessor: string]: (text: string, vars: Record<strin
|
||||||
.map(([name, value]) => `--${name}: ${value}`)
|
.map(([name, value]) => `--${name}: ${value}`)
|
||||||
.join("; ");
|
.join("; ");
|
||||||
|
|
||||||
return `/* ==Vencord== */\n:root{${variables}}\n/* ==/Vencord== */${text}`;
|
return `/* ==Equicord== */\n:root{${variables}}\n/* ==/Equicord== */${text}`;
|
||||||
},
|
},
|
||||||
|
|
||||||
async uso(text: string, vars: Record<string, string>) {
|
async uso(text: string, vars: Record<string, string>) {
|
||||||
|
@ -55,7 +55,11 @@ const preprocessors: { [preprocessor: string]: (text: string, vars: Record<strin
|
||||||
};
|
};
|
||||||
|
|
||||||
export async function compileUsercss(fileName: string) {
|
export async function compileUsercss(fileName: string) {
|
||||||
const themeData = await VencordNative.themes.getThemeData(fileName);
|
try {
|
||||||
|
var themeData = await VencordNative.themes.getThemeData(fileName);
|
||||||
|
} catch (e) {
|
||||||
|
UserCSSLogger.warn("Failed to get theme data for", fileName, "(has it gone missing?)", e);
|
||||||
|
}
|
||||||
if (!themeData) return null;
|
if (!themeData) return null;
|
||||||
|
|
||||||
// UserCSS preprocessor order look like this:
|
// UserCSS preprocessor order look like this:
|
||||||
|
|
Loading…
Reference in a new issue