How arco-design/arco-design-vue works
This project is a monorepo containing a comprehensive Vue UI component library based on the Arco Design system. The primary purpose is to offer a modern, highly customizable, TypeScript‐friendly UI components collection that developers can integrate directly into Vue applications. Additionally, the project provides supporting packages for documentation, changelog generation, build scripts, and even storybook setups for interactive demos.
Main Components/Packages
• UI Component Library (packages/web-vue):
– This package contains the core Vue components. Within its “components” folder, you have distinct subdirectories for nearly every UI element (e.g., Button, Input, Modal, Table, Dropdown, etc.), each following a component-based pattern.
– Emphasize the usage of TypeScript and theming customization via extensive theme tokens.
• Documentation Website (packages/arco-vue-docs):
– Acts as the public documentation and demo site for the UI components. It includes pages, assets, components, and i18n support.
• Developer Utilities and Scripts (packages/arco-vue-scripts):
– Contains build configurations, scripts for testing, packaging, changelog generation (packages/arco-changelog), and other automation-related tasks.
• Plugins for Build and Development Tools (packages/vite-plugin-arco-vue-docs):
– Provides assistance for integrating the documentation and UI components with Vite.
• Interactive Demos/Storybook (packages/web-vue-storybook):
– A separate package to showcase the components and their variations through Storybook stories.
Interrelationships and Data Flow
– The UI component library is consumed by the documentation website and the storybook demo.
– The developer utilities and scripts interact with both the core library and documentation, automating tasks like building, testing, and changelog generation.
– Plugins (vite-plugin-arco-vue-docs) extend the build tools and integrate with the docs site.
Important Architectural Patterns
• Modular Architecture: The system is broken down into discrete packages (each handling its own concern) that are managed under a monorepo. Highlight this separation to indicate clarity in responsibilities.
• Component-Based Design: For the UI library, show that every component (e.g., button, form, modal) is organized into its own subfolder, following a structure that includes demos, styles, tests, and documentation.
• Build and Development Pipeline: Include elements like GitHub workflows (in .github/workflows) for CI/CD (deploy-site-preview, issue management, release workflows, etc.) that automate tasks. This infrastructure supports testing, code formatting (eslint, prettierrc), commit message linting (commitlint.config.js), and more.
Technology and Tooling Stack
• Vue and TypeScript: Emphasize that the UI components are built using Vue (Vue 3 likely) and are strongly typed with TypeScript.
• CSS Pre-/Post-processing: The theming system is built using Less (for theme tokens and style customization) plus support for pre-configured style configurations.
• Build tooling using Vite and other scripts – the presence of vite.config.ts files and various build settings indicates custom configurations.
• Development ecosystem includes ESLint, Prettier, commitlint, etc., as suggested by the configuration files in the root and in each package.