feat: improve coverage
This commit is contained in:
@@ -26,9 +26,7 @@ class Command(BaseCommand):
|
||||
|
||||
def handle(self, *args, **options):
|
||||
web_settings = WebSettings.load()
|
||||
path = os.path.join(
|
||||
settings.BASE_DIR, "theme", "static", "css", "main.css"
|
||||
)
|
||||
path = os.path.join(settings.BASE_DIR, "theme", "static", "css", "main.css")
|
||||
|
||||
colors = []
|
||||
for color_name, data in web_settings.theme_colors.items():
|
||||
@@ -38,18 +36,21 @@ class Command(BaseCommand):
|
||||
|
||||
result = str(
|
||||
render_to_string(
|
||||
"theme/main.css.template", context={"colors": colors},
|
||||
"theme/main.css.template",
|
||||
context={"colors": colors},
|
||||
)
|
||||
)
|
||||
with open(path, "w") as f:
|
||||
f.write(result)
|
||||
|
||||
subprocess.run([
|
||||
"tailwindcss",
|
||||
"-i",
|
||||
"theme/static/css/main.css",
|
||||
"-o",
|
||||
"theme/static/css/styles.css",
|
||||
"--minify",
|
||||
])
|
||||
subprocess.run(
|
||||
[
|
||||
"tailwindcss",
|
||||
"-i",
|
||||
"theme/static/css/main.css",
|
||||
"-o",
|
||||
"theme/static/css/styles.css",
|
||||
"--minify",
|
||||
]
|
||||
)
|
||||
call_command("collectstatic", "--no-input")
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user