Quick Start
Requirements
- Node.js >= 20.12.0
- pnpm >= 10.0.0
Installation
bash
# Clone the project
git clone https://github.com/fonghehe/vue-h5-template.git
cd vue-h5-template
# Install dependencies
pnpm installDevelopment
bash
# Start all apps (interactive selection)
pnpm dev
# Start a specific app
pnpm dev:nutui # NutUI version
pnpm dev:vant # Vant version
pnpm dev:varlet # Varlet versionThe mock server starts automatically at http://localhost:5320 via Nitro, and the frontend proxies /api requests to it.
Build
bash
# Build all apps
pnpm build
# Build a specific app
pnpm build:nutui
pnpm build:vant
pnpm build:varletPreview
bash
cd apps/h5-nutui
pnpm previewCleanup
bash
# Clean all node_modules, dist, .turbo cache
pnpm clean
# Also delete lock file
pnpm clean --del-lockCreate New App
bash
# Interactively create a new H5 app via CLI
pnpm create-appSupports Varlet / Vant / NutUI, auto-generates a complete project structure. See Create App.
Test Accounts
The mock server provides these test accounts:
| Username | Password | Role |
|---|---|---|
| user | 123456 | Regular user |
| admin | 123456 | Admin |