Commit 66623a20 authored by shadMod's avatar shadMod 💬

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

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