Commit e8808f81 authored by shadMod's avatar shadMod 💬

added dynamism to compile all scss in build_scss()

parent bccbbee5
......@@ -90,6 +90,16 @@ def init(data, debug):
def build_scss():
"""Compile the scss file"""
print("Compile the scss file")
path = f"{BASE_DIR}/assets/scss/www.scss"
with open(f"{BASE_DIR}/uitwww/static/website.css", "w") as fn:
fn.write(minify(compile_file(path)))
# init list of css path
css_path = ["libs/main", "vendor/bootstrap_v5"]
for val in css_path:
# init path css
path = f"{UITWWW_DIR}/static/assets/{val}.css"
# check and mk dir if dir_ not exists
if not os.path.isdir(os.path.dirname(path)):
os.makedirs(os.path.dirname(path))
# open file, compile and write css
with open(path, "w") as fn:
fn.write(minify(compile_file(
f"{BASE_DIR}/assets/scss/{val}.scss"
)))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment