How sveltejs/cli works
Main Components Organization
• CLI Core System
• -ons System
• Migration System
• Creation System
• Tooling Infrastructure
Component Relationships
a) CLI Core System (Central Hub):
• It to command handlers:
• create (sv-create)
• (sv-add)
• check (sv-check)
• migrate (sv-migrate)
b) -ons System (Right Side):
• Drizzle
• ESLint
• Lucia
• MDSvex
• Playwright
• etc.
c) Creation System (Left Side):
• Templates container:
• Demo template
• Library template
• Minimal template
• To shared resources
• Link to CLI create command
d) Migration System (Bottom):
• Migration types:
• App state migrations
• Package migrations
• Routes migrations
• Svelte version migrations
• To CLI migrate command
e) Tooling Infrastructure (Top):
• AST Tooling
• Core Tooling
• Clack Prompts (CLI interface)
Implementation Details
Technical aspects:
• Package manager integration
• File system operations
• Command processing flow
• -on resolution system
• Template processing pipeline
Data Flow Indicators
Interactions:
• Command input → CLI Core → Specific handlers
• Template selection → Creation system → Project output
• -on selection → Add-on system → Project modification
• Migration source → Migration system → Updated code
Additional Elements
Supporting components:
• Configuration management
• Testing infrastructure
• Documentation system
• Community integration points