diff --git a/scripts/dev/generate_pattern_info.py b/scripts/dev/generate_pattern_info.py index 9fa3394..7b2e785 100644 --- a/scripts/dev/generate_pattern_info.py +++ b/scripts/dev/generate_pattern_info.py @@ -2,6 +2,7 @@ import asyncio import json import logging +import shutil import sys from pathlib import Path from typing import TypedDict @@ -45,6 +46,8 @@ async def _build_registry(): out_dir = Path("out") patterns_dir = out_dir / "patterns" +shutil.rmtree(patterns_dir, ignore_errors=True) + out_dir.mkdir(parents=True, exist_ok=True) patterns_dir.mkdir(parents=True, exist_ok=True) for theme in Theme: