关于 uni-helper
uni-helper 是面向 uni-app 开发者的工具集合,涵盖 Vite 插件、实用库、TypeScript 支持和项目模板,用于扩展项目开发能力。
主要功能
- 01基于文件的页面路由
- 02组件按需自动导入
- 03平台专属文件编译
- 04组合式与网络工具库
- 05模板 TypeScript 类型定义
- 06项目脚手架与起始模板
适用场景
- 01创建新的 uni-app 项目
- 02添加路由和布局系统
- 03按需导入组件
- 04处理平台专属文件
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ uni-helper/ skills --skill uni-helper安装后在 Claude Code 中输入/uni-helper确认已加载。
包含的文件
除 SKILL.md 外,安装时一起下载的参考资料和脚本。
GENERATION.mdreferences/lib-uni-network.mdlib-uni-promises.mdlib-uni-typed.mdlib-uni-use.mdplugin-components.mdplugin-layouts.mdplugin-manifest.mdplugin-middleware.mdplugin-pages.mdplugin-platform-modifier.mdplugin-platform.mdstarter-create-uni.mdstarter-vitesse.mdutil-uni-env.mdutil-unocss-preset.md详细介绍
此技能基于 uni-helper 文档生成,生成日期为 2026-01-30。
uni-helper 是一套面向 uni-app 的 AI 驱动开发工具生态,提供 Vite 插件、实用工具库、TypeScript 支持和开发工具,以提升 uni-app 开发体验。
Vite 插件
| 主题 | 描述 | 参考 |
|---|---|---|
| vite-plugin-uni-pages | 面向 uni-app 的基于文件的路由系统,可自动发现页面 | plugin-pages |
| vite-plugin-uni-layouts | 面向 uni-app 的 Nuxt 风格布局系统 | plugin-layouts |
| vite-plugin-uni-components | 按需自动导入组件 | plugin-components |
| vite-plugin-uni-manifest | 使用 TypeScript 编写 manifest.json | plugin-manifest |
| vite-plugin-uni-platform | 基于文件的平台编译(*.h5 | mp-weixin |
| vite-plugin-uni-platform-modifier | 用于属性和指令的平台修饰符 | plugin-platform-modifier |
| vite-plugin-uni-middleware | 为 uni-app 路由提供中间件支持 | plugin-middleware |
库
| 主题 | 描述 | 参考 |
|---|---|---|
| uni-use | 面向 uni-app 的 VueUse 风格组合式工具 | lib-uni-use |
| uni-network | 面向 uni-app 的基于 Promise 的 HTTP 客户端 | lib-uni-network |
| uni-promises | uni-app API 的 Promise 封装 | lib-uni-promises |
| uni-typed | uni-app 模板的 TypeScript 类型定义 | lib-uni-typed |
实用工具
| 主题 | 描述 | 参考 |
|---|---|---|
| uni-env | 面向 uni-app 的环境检测工具 | util-uni-env |
| unocss-preset-uni | 面向 uni-app 的 UnoCSS 预设 | util-unocss-preset |
项目启动模板
| 主题 | 描述 | 参考 |
|---|---|---|
| create-uni | 用于 uni-app 项目的命令行脚手架工具 | starter-create-uni |
| vitesse-uni-app | 由 Vite 驱动的 uni-app 启动模板 | starter-vitesse |
插件顺序最佳实践
使用多个 uni-helper Vite 插件时,推荐顺序如下:
// vite.config.ts
export default defineConfig({
plugins: [
UniComponents(), // 1. Component auto-import
UniPages(), // 2. File-based routing
UniLayouts(), // 3. Layout system
UniManifest(), // 4. Manifest generation
UniPlatform(), // 5. Platform-specific files
UniPlatformModifier(), // 6. Platform modifiers
UniMiddleware(), // 7. Route middleware
Uni(), // 8. Official uni-app plugin (always last)
],
})
快速开始
使用 create-uni 创建新的 uni-app 项目:
# npm 7+, extra double-dash is needed
npm create uni@latest
# pnpm
pnpm create uni
# yarn
yarn create uni
官方资源
- 网站:https://uni-helper.js.org
- GitHub:https://github.com/uni-helper
- NPM 范围:@uni-helper
评论
支持 Markdown