@twotwoba/vv-cli
Version:
Easily create Vite + React19/Vue3 web/h5/mini-program/chrome-extension projects.
103 lines (74 loc) ⢠1.77 kB
Markdown
# 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