-
Notifications
You must be signed in to change notification settings - Fork 0
refactor: consolidate design folders under design/ #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
29014b6
c7117d2
0c4f894
7cf260e
c58514f
fb78042
af4007e
9ee7923
c7d9178
4ace7a4
6f2355e
a4d59ba
30e341b
3f68fd2
700ec11
2e576ac
8581a62
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -468,7 +468,7 @@ def generate_design_system(query: str, project_name: str = None, output_format: | |||||
| query: Search query (e.g., "SaaS dashboard", "e-commerce luxury") | ||||||
| project_name: Optional project name for output header | ||||||
| output_format: "ascii" (default) or "markdown" | ||||||
| persist: If True, save design system to design-system/ folder | ||||||
| persist: If True, save design system to design/system/ folder | ||||||
| page: Optional page name for page-specific override file | ||||||
| output_dir: Optional output directory (defaults to current working directory) | ||||||
|
|
||||||
|
|
@@ -490,7 +490,7 @@ def generate_design_system(query: str, project_name: str = None, output_format: | |||||
| # ============ PERSISTENCE FUNCTIONS ============ | ||||||
| def persist_design_system(design_system: dict, page: str = None, output_dir: str = None, page_query: str = None) -> dict: | ||||||
| """ | ||||||
| Persist design system to design-system/<project>/ folder using Master + Overrides pattern. | ||||||
| Persist design system to design/system/<project>/ folder using Master + Overrides pattern. | ||||||
|
|
||||||
| Args: | ||||||
| design_system: The generated design system dictionary | ||||||
|
|
@@ -507,7 +507,7 @@ def persist_design_system(design_system: dict, page: str = None, output_dir: str | |||||
| project_name = design_system.get("project_name", "default") | ||||||
| project_slug = project_name.lower().replace(' ', '-') | ||||||
|
|
||||||
| design_system_dir = base_dir / "design-system" / project_slug | ||||||
| design_system_dir = base_dir / "design" / "system" / project_slug | ||||||
| pages_dir = design_system_dir / "pages" | ||||||
|
|
||||||
| created_files = [] | ||||||
|
|
@@ -542,21 +542,22 @@ def persist_design_system(design_system: dict, page: str = None, output_dir: str | |||||
| def format_master_md(design_system: dict) -> str: | ||||||
| """Format design system as MASTER.md with hierarchical override logic.""" | ||||||
| project = design_system.get("project_name", "PROJECT") | ||||||
| project_slug = project.lower().replace(' ', '-') | ||||||
| pattern = design_system.get("pattern", {}) | ||||||
| style = design_system.get("style", {}) | ||||||
| colors = design_system.get("colors", {}) | ||||||
| typography = design_system.get("typography", {}) | ||||||
| effects = design_system.get("key_effects", "") | ||||||
| anti_patterns = design_system.get("anti_patterns", "") | ||||||
|
|
||||||
| timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S") | ||||||
|
|
||||||
| lines = [] | ||||||
|
|
||||||
| # Logic header | ||||||
| lines.append("# Design System Master File") | ||||||
| lines.append("") | ||||||
| lines.append("> **LOGIC:** When building a specific page, first check `design-system/pages/[page-name].md`.") | ||||||
| lines.append(f"> **LOGIC:** When building a specific page, first check `design/system/{project_slug}/pages/[page-name].md`.") | ||||||
| lines.append("> If that file exists, its rules **override** this Master file.") | ||||||
| lines.append("> If not, strictly follow the rules below.") | ||||||
| lines.append("") | ||||||
|
|
@@ -819,7 +820,7 @@ def format_page_override_md(design_system: dict, page_name: str, page_query: str | |||||
| lines.append(f"> **Generated:** {timestamp}") | ||||||
| lines.append(f"> **Page Type:** {page_overrides.get('page_type', 'General')}") | ||||||
| lines.append("") | ||||||
| lines.append("> ⚠️ **IMPORTANT:** Rules in this file **override** the Master file (`design-system/MASTER.md`).") | ||||||
| lines.append("> ⚠️ **IMPORTANT:** Rules in this file **override** the Master file (`design/system/MASTER.md`).") | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Page override file references MASTER.md without project slug, pointing to wrong path In
Suggested change
Was this helpful? React with 👍 or 👎 to provide feedback. |
||||||
| lines.append("> Only deviations from the Master are documented here. For all other rules, refer to the Master.") | ||||||
| lines.append("") | ||||||
| lines.append("---") | ||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.