How kong/design-tokens works
Component Details and Relationships
a. Token Management Layer:
[Token Source Files] ─────┐
[Token Alias Files] ──────┼─→ [Style Dictionary Build System]
[Config Files] ───────────┘
b. Distribution Layer:
• ┌─→ [SCSS Output]
• → [LESS Output]
[Build System] ────→├─→ [CSS Custom Properties]
• → [JavaScript/TypeScript]
• → [JSON Output]
c. Integration Layer:
• ┌─→ [Host Applications]
[Output Formats] ──→├─→ [Standalone Components]
• → [Development Sandbox]
Important Elements
• Token Directory Structure:
• /tokens
• /alias (Internal references)
• /source (Exportable tokens)
• /animation
• /border
• /components
• Build Process Flow:
• [Source Files] → [Style Dictionary] → [Platform Transforms] → [Dist Outputs]
• Integration Points:
• Stylelint Plugin connection
• VS Code Extension support
• Development Sandbox relationship
Additional Details
• A note about devDependency usage
• Package distribution flow
• Token validation and linting points
• Special indicators
This system design should emphasize the project's role as a design token management system that serves as a crucial part of Kong's design system infrastructure, highlighting both the build process and the consumption patterns.