How ethan-heo/generate-design-token works
Main Components
a) Core Processing Components:
• Token Parser
• Token Generator
• Token Transformer
• Token Validator
b) Input/Output Components:
• Input Token Definitions (JSON)
• Template Engine (EJS)
• Output Generators (File/String)
c) Support Systems:
• Helper Functions
• Type System
• Validation Rules
┌─ Input Layer ─────────────────────┐
• JSON Token Definitions │
• EJS Templates │
• ┬───────────────────┘
• ↓
┌─ Core Processing Layer ───────────┐
• ┌─ Parser ─────┐ ┌─ Validator ─┐ │
• Parse │→ │ - Format │ │
• Tokenize │ │ - Duplicate │ │
• ┘ └─────────────┘ │
• ↓ ↓ │
• ┌─ Transformer ─┐ ┌─ Generator ┐ │
• Case 1-4 │←→│ - Content │ │
• References │ │ - File │ │
• ┘ └─────────────┘ │
• ┬───────────────────┘
• ↓
┌─ Output Layer ────────────────────┐
• Generated Files │
• Generated Strings │
• ┘
Important Relationships
• Flow from input JSON through the processing pipeline to output
Additional Elements
A separate panel showing:
• Supported token types
• Template helpers
• Transform cases (1-4 as described in README)
• File format support
Technical Details
• EJS template integration
• Token reference resolution
• Transformation patterns
• Validation rules
• Output format options
Implementation Notes
• Use standardized UML notation where appropriate
• Notes for key configuration options
• Error handling paths