reflex/scripts/clean_examples.py
Devin AI fe7f18a5c4 docs+feat: improve contributing guide and add clean_examples utility
- Add more detailed instructions for development workflow
- Clarify type stub generation process
- Add troubleshooting section
- Add clean_examples.py utility script
- Improve formatting and organization

Co-Authored-By: Alek Petuskey <alek@reflex.dev>
2024-12-11 03:45:53 +00:00

26 lines
767 B
Python
Executable File

#!/usr/bin/env python3
"""Script to clean up the examples directory.
This script helps developers maintain a clean development environment by removing
the examples directory and its contents. This is useful when switching between
different example apps or when wanting to start fresh.
"""
import shutil
from pathlib import Path
def clean_examples():
"""Remove the examples directory and its contents."""
examples_dir = Path(__file__).parent.parent / "examples"
if examples_dir.exists():
print(f"Removing examples directory at {examples_dir}")
shutil.rmtree(examples_dir)
print("Examples directory removed successfully.")
else:
print("No examples directory found.")
if __name__ == "__main__":
clean_examples()