Commit 0403b99f authored by shadMod's avatar shadMod 💬

fixed build_scss() with 'libsass' to compile and write static 'website.css'

parent 4c085538
Pipeline #280 failed with stage
in 0 seconds
...@@ -87,16 +87,9 @@ def init(data): ...@@ -87,16 +87,9 @@ 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') base_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..")
css_file = open('%s/uitwww/static/website.css' % base_dir, 'wb') path = f"{base_dir}/assets/scss/www.scss"
subprocess.run( with open(f"{base_dir}/uitwww/static/website.css", "w") as fn:
[sys.executable, '-mscss'], fn.write(sass.compile(filename=path))
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