Create UniApp projects with Rose template - supports both direct and interactive creation
š¹ Create UniApp projects with Rose template - supports both direct and interactive creation
- š Vue3 + TypeScript - Modern development stack
- š¦ Pinia - State management
- š Alova - Network request library
- šØ uv-ui - Component library
- š Authentication System - Complete auth flow with route guards
- š± Multi-platform - H5, WeChat Mini Program, APP
- š ļø Developer Experience - Hot reload, TypeScript support
- šÆ Two Creation Modes - Direct and interactive
``bashUsing pnpm (recommended)
pnpm create rose-uniapp my-project
$3
`bash
Using pnpm (recommended)
pnpm create rose-uniappUsing npm
npm create rose-uniappUsing yarn
yarn create rose-uniapp
`Then follow the interactive prompts to configure your project.
What's Included
$3
`
my-project/
āāā src/
ā āāā components/ # Reusable components
ā āāā pages/ # Page components
ā āāā store/ # Pinia stores
ā āāā utils/ # Utility functions
ā āāā router/ # Route configuration
ā āāā mixins/ # Global mixins
ā āāā types/ # TypeScript definitions
āāā docs/ # Documentation
āāā tailwindPlugin/ # Tailwind CSS plugins
āāā package.json
āāā ...
`$3
- š Vue3 + TypeScript: Modern development stack
- š¦ Pinia: State management with persistence
- š Alova: Advanced HTTP client with caching
- šØ uv-ui + Element Plus: Rich component libraries
- š Authentication System: Complete auth flow with route guards
- šÆ Multi-platform: H5, WeChat Mini Program, APP support
- šØ Tailwind CSS: Utility-first CSS framework
- š± Responsive Design: Mobile-first approach
- š§ Development Tools: Hot reload, TypeScript, ESLint
$3
This package uses a true dynamic template system with the following priority:
1. š Git Repository Download (Primary)
- Downloads latest code from
https://git.code.tencent.com/DefaultTemplate/uniapp.git
- The entire uniapp project is the template
- Ensures users always get the newest features and fixes
- Uses shallow clone (--depth 1) for faster downloads2. š”ļø Built-in Template (Fallback)
- Minimal UniApp project structure
- Ensures the tool always works, even offline
- Includes Vue3 + TypeScript + basic configuration
Key Benefits:
- ā
Always up-to-date - No manual template synchronization needed
- ā
Zero maintenance - Templates update automatically
- ā
Reliable fallbacks - Works in any environment
- ā
Development friendly - Supports local development mode
$3
`bash
Install dependencies
pnpm installDevelopment
pnpm dev:h5 # H5 development
pnpm dev:mp-weixin # WeChat Mini Program
pnpm dev:app # APP development
pnpm roseh # Rose mode developmentBuild
pnpm build:h5 # H5 build
pnpm build:mp-weixin # WeChat Mini Program build
pnpm build:app # APP build
`Template Options
$3
- Full-featured template with all components
- Authentication system
- Complete UI components
- Network layer setup$3
- Basic project structure
- Essential dependencies only
- Perfect for starting from scratchRequirements
- Node.js: >= 14.0.0
- pnpm: >= 7.0.0 (recommended)
CLI Options
`bash
create-rose-uniapp [project-name] [options]Options:
-f, --force Overwrite target directory if it exists
-t, --template Template variant (default: "default")
-h, --help Display help for command
-V, --version Display version number
`Examples
$3
`bash
pnpm create rose-uniapp my-app --template minimal
`$3
`bash
pnpm create rose-uniapp my-app --force
`$3
`bash
pnpm create rose-uniapp
Follow the prompts:
ā What is your project name? ⦠my-awesome-app
ā Project description: ⦠My awesome UniApp project
ā Author name: ⦠Your Name
ā Choose a template variant: āŗ Default (Vue3 + TypeScript + Full Features)
`Contributing
We welcome contributions! Please see our Contributing Guide for details.
$3
`bash
Clone the create tool repository
git clone https://git.code.tencent.com/DefaultTemplate/create-rose-uniapp.git
cd create-rose-uniappInstall dependencies
pnpm installPrepare the tool
pnpm prepareTest locally
pnpm test
``MIT Ā© rosesnsn
- š¦ NPM Package
- š Create Tool Repository
- šØ Template Repository
- š Documentation
- š Issue Tracker
---
Created with ā¤ļø by rosesnsn