Commit 50003c7e authored by shadMod's avatar shadMod 💬

fixed build_scss() to compile static 'website.css'

parent 40d65e2b
...@@ -88,16 +88,8 @@ def init(data): ...@@ -88,16 +88,8 @@ def init(data):
@cli.command("build_scss") @cli.command("build_scss")
def build_scss(): def build_scss():
"""Build the scss file""" """Compile the scss file"""
base_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..') print("Compile the scss file")
scss_file = open('%s/assets/scss/www.scss' % base_dir, 'rb') path = f"{BASE_DIR}/assets/scss/www.scss"
css_file = open('%s/uitwww/static/website.css' % base_dir, 'wb') with open(f"{BASE_DIR}/uitwww/static/website.css", "w") as fn:
subprocess.run( fn.write(compile_file(path))
[sys.executable, '-mscss'],
stdin=scss_file,
stdout=css_file,
check=True,
)
css_file.flush()
scss_file.close()
css_file.close()
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