mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-06 07:37:19 +02:00
Fix macros/build.renderStylus() not loading CSS each build
This commit is contained in:
parent
0d3385790c
commit
09a2c86ad4
@ -1,18 +1,19 @@
|
||||
import stylus from 'stylus';
|
||||
|
||||
import cssStr from "@assets/css/styles.styl" with { type: "text" };
|
||||
export const renderStylus = async () => {
|
||||
const file = Bun.file('./src/assets/css/styles.styl');
|
||||
const cssStr = await file.text();
|
||||
|
||||
const generatedCss = await (stylus(cssStr, {})
|
||||
.set('filename', 'styles.css')
|
||||
.set('compress', true)
|
||||
.include('src/assets/css/'))
|
||||
.render();
|
||||
const generatedCss = await (stylus(cssStr, {})
|
||||
.set('filename', 'styles.css')
|
||||
.set('compress', true)
|
||||
.include('src/assets/css/'))
|
||||
.render();
|
||||
|
||||
export const renderStylus = () => {
|
||||
return generatedCss;
|
||||
};
|
||||
|
||||
|
||||
export const compressCss = async (css: string) => {
|
||||
return await (stylus(css, {}).set('compress', true)).render();
|
||||
return await (stylus(css, {}).set('compress', true)).render();
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user