mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-10 01:27:19 +02:00
20 lines
488 B
TypeScript
20 lines
488 B
TypeScript
import stylus from 'stylus';
|
|
|
|
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();
|
|
|
|
return generatedCss;
|
|
};
|
|
|
|
|
|
export const compressCss = (css: string) => {
|
|
return (stylus(css, {}).set('compress', true)).render();
|
|
};
|