vonxq-expo-cli
v1.0.1
Published
Expo React Native 项目脚手架工具,快速创建包含通用组件和同步功能的新项目
Maintainers
Readme
vonxq-expo-cli
Expo React Native 项目脚手架工具,快速创建包含通用组件和同步功能的新项目。
安装
npm install -g vonxq-expo-cli使用
交互式创建项目
vonxq-expo
# 或
vxe指定项目名称
vonxq-expo my-app使用默认配置(快速创建)
vonxq-expo my-app -y创建的项目结构
my-app/
├── app/ # 页面路由
│ ├── (tabs)/ # Tab 页面
│ │ ├── _layout.tsx # Tab 布局
│ │ ├── index.tsx # 首页
│ │ └── settings.tsx # 设置页
│ └── _layout.tsx # 根布局
├── components/ # 组件
│ └── common/ # 通用组件
├── services/ # 服务
│ └── sync/ # 同步服务
├── store/ # 状态管理 (Zustand)
├── constants/ # 常量 (主题色等)
├── config/ # 配置文件
│ ├── README.md # 配置说明
│ └── sync.json # 同步配置
├── assets/ # 资源文件
├── Makefile # 常用命令
├── app.json # Expo 配置
├── package.json
└── README.md功能特性
- ✅ 预配置的 Expo Router 路由
- ✅ Tab 导航(首页 + 设置页)
- ✅ 深色主题 UI
- ✅ Zustand 状态管理
- ✅ vonxq-expo-common-kit 组件库
- ✅ 本地备份/恢复功能
- ✅ iCloud 同步功能(iOS)
- ✅ Makefile 常用命令
- ✅ TypeScript 支持
iCloud 配置
如果启用了 iCloud 功能,需要在 Apple Developer 账户中配置:
- 登录 Apple Developer
- 进入 Certificates, Identifiers & Profiles
- 找到你的 App ID
- 勾选 iCloud 功能
- 启用 iCloud Documents 和 CloudKit
详细配置请查看生成项目中的 config/README.md。
Makefile 命令
make start # 启动开发服务器
make ios # 在 iOS 模拟器运行
make android # 在 Android 模拟器运行
make build # 构建应用
make build-android # 构建 Android
make build-ios # 构建 iOS
make clean # 清理构建产物
make reinstall # 重新安装依赖
make prebuild # 预构建原生项目License
MIT
