📦 deps(skills): sync thirdparty skills
This commit is contained in:
+11
-2
@@ -16,10 +16,18 @@ Usage:
|
|||||||
import csv
|
import csv
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
|
import io
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from core import search, DATA_DIR
|
from core import search, DATA_DIR
|
||||||
|
|
||||||
|
# Force UTF-8 for stdout/stderr to handle emojis/box-drawing chars on Windows (cp1252 default)
|
||||||
|
if sys.stdout.encoding and sys.stdout.encoding.lower() != 'utf-8':
|
||||||
|
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
|
||||||
|
if sys.stderr.encoding and sys.stderr.encoding.lower() != 'utf-8':
|
||||||
|
sys.stderr = io.TextIOWrapper(sys.stderr.buffer, encoding='utf-8')
|
||||||
|
|
||||||
|
|
||||||
# ============ CONFIGURATION ============
|
# ============ CONFIGURATION ============
|
||||||
REASONING_FILE = "ui-reasoning.csv"
|
REASONING_FILE = "ui-reasoning.csv"
|
||||||
@@ -573,8 +581,9 @@ def persist_design_system(design_system: dict, page: str = None, output_dir: str
|
|||||||
"""
|
"""
|
||||||
base_dir = Path(output_dir) if output_dir else Path.cwd()
|
base_dir = Path(output_dir) if output_dir else Path.cwd()
|
||||||
|
|
||||||
# Use project name for project-specific folder
|
# Use project name for project-specific folder. Coalesce falsy values
|
||||||
project_name = design_system.get("project_name", "default")
|
# (missing key, explicit None, or "") so the .lower() below can't crash.
|
||||||
|
project_name = design_system.get("project_name") or "default"
|
||||||
project_slug = project_name.lower().replace(' ', '-')
|
project_slug = project_name.lower().replace(' ', '-')
|
||||||
|
|
||||||
design_system_dir = base_dir / "design-system" / project_slug
|
design_system_dir = base_dir / "design-system" / project_slug
|
||||||
|
|||||||
Reference in New Issue
Block a user