📦 deps(thirdparty): update snapshots
This commit is contained in:
@@ -9,10 +9,32 @@ import json
|
||||
import csv
|
||||
import re
|
||||
import sys
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
# Project root relative to this script
|
||||
PROJECT_ROOT = Path(__file__).parent.parent.parent.parent.parent
|
||||
# The skill can be installed outside the project it operates on (user-level
|
||||
# ~/.claude/skills/, or as a plugin), so the project root cannot be derived from
|
||||
# this file's location. Resolve it from the working directory instead -- the same
|
||||
# convention generate-tokens.cjs and validate-tokens.cjs already use via
|
||||
# process.cwd(). DESIGN_SYSTEM_PROJECT_ROOT overrides it explicitly.
|
||||
def _find_project_root():
|
||||
override = os.environ.get('DESIGN_SYSTEM_PROJECT_ROOT')
|
||||
if override:
|
||||
return Path(override).resolve()
|
||||
start = Path.cwd().resolve()
|
||||
markers = (
|
||||
Path('assets') / 'design-tokens.json',
|
||||
Path('assets') / 'design-tokens.css',
|
||||
Path('package.json'),
|
||||
Path('.git'),
|
||||
)
|
||||
for candidate in (start, *start.parents):
|
||||
if any((candidate / marker).exists() for marker in markers):
|
||||
return candidate
|
||||
return start
|
||||
|
||||
|
||||
PROJECT_ROOT = _find_project_root()
|
||||
TOKENS_PATH = PROJECT_ROOT / 'assets' / 'design-tokens.json'
|
||||
BACKGROUNDS_CSV = Path(__file__).parent.parent / 'data' / 'slide-backgrounds.csv'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user