UNPKG

@twotwoba/vv-cli

Version:

Easily create Vite + React19/Vue3 web/h5/mini-program/chrome-extension projects.

103 lines (74 loc) • 1.77 kB
# UI Component Library A modern Vue 3 component library built with Vite 8, TypeScript, and pnpm workspace. ## Features - šŸš€ Built with Vite 8 (with Rolldown beta) - šŸ“¦ pnpm monorepo structure - šŸŽØ TypeScript support - šŸ”„ Hot Module Replacement (HMR) - šŸ“š Component playground for development - šŸŽÆ Tree-shakable exports - šŸ“ Full type definitions ## Project Structure ``` . ā”œā”€ā”€ packages/ │ └── components/ # Main component library │ ā”œā”€ā”€ src/ │ │ ā”œā”€ā”€ button/ # Button component │ │ ā”œā”€ā”€ input/ # Input component │ │ └── index.ts # Library entry point │ ā”œā”€ā”€ package.json │ └── vite.config.ts ā”œā”€ā”€ playground/ # Development playground │ ā”œā”€ā”€ src/ │ ā”œā”€ā”€ package.json │ └── vite.config.ts ā”œā”€ā”€ pnpm-workspace.yaml └── package.json ``` ## Getting Started ### Install dependencies ```bash pnpm install ``` ### Development Start the playground for component development: ```bash pnpm dev ``` ### Build Build the component library: ```bash pnpm build ``` Build all packages: ```bash pnpm build:all ``` ### Type Check ```bash pnpm type-check ``` ## Usage After publishing to npm, you can use the library in your project: ```bash npm install your-ui-library # or pnpm add your-ui-library ``` ### Import all components ```ts import { createApp } from 'vue' import YourUI from 'your-ui-library' import 'your-ui-library/style.css' const app = createApp(App) app.use(YourUI) ``` ### Import on demand ```ts import { Button, Input } from 'your-ui-library' // You still need to import the full stylesheet import 'your-ui-library/style.css' ``` ## License MIT