feat/flask: change scss compiler to Python lib

This commit is contained in:
2025-08-27 09:58:20 +03:00
committed by Sweetbread
parent 4eb8bdd170
commit 5a4a306255
2 changed files with 8 additions and 4 deletions
+6 -2
View File
@@ -1,7 +1,9 @@
from os import path, listdir, system
from os import path, listdir
from datetime import date
from configparser import ConfigParser
import sass
from flask import (
Flask,
redirect,
@@ -19,7 +21,9 @@ from flask import (
app = Flask(__name__)
if app.debug:
system("sass static/style.scss static/style.css")
css = sass.compile(filename="static/style.scss")
with open("static/style.css", "w", encoding="utf-8") as f:
f.write(css)
# ---------- LOCALES FUNCTIONS -----------------------------------------------