Refactor: JS in js/, LESS in less/, clientseitige Less-Kompilierung via less.js CDN

This commit is contained in:
2026-05-25 01:54:53 +02:00
parent f5d6d59cdd
commit 3b1a4ce4e4
6 changed files with 5 additions and 45 deletions

View File

@@ -7,7 +7,6 @@ Serviert statische Dateien direkt.
import http.server
import socketserver
import os
import subprocess
PORT = int(os.environ.get("PORT", 8111))
@@ -48,17 +47,6 @@ class StaticHandler(http.server.BaseHTTPRequestHandler):
print(f"[{self.log_date_time_string()}] {args[0]}")
def main():
# LESS → CSS beim Serverstart kompilieren
print("[BUILD] Kompiliere style.less -> style.css ...")
try:
result = subprocess.run(["node", "build-less.js"], capture_output=True, text=True, cwd=os.path.dirname(os.path.abspath(__file__)))
if result.returncode == 0:
print(f"[BUILD] {result.stdout.strip()}")
else:
print(f"[BUILD] FEHLER: {result.stderr.strip()}")
except FileNotFoundError:
print("[BUILD] node nicht gefunden überspringe LESS-Kompilierung")
print("=" * 50)
print(" [TROPHY] Lara Kiesewetter Live Schachturnier")
print("=" * 50)