expo-bbase 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,118 @@
1
+ # expo-bbase
2
+
3
+ Expo SDK 54+ 脚手架 CLI 工具,支持交互式选择功能模块一键生成 React Native 项目。
4
+
5
+ ## 快速开始
6
+
7
+ ```bash
8
+ npx expo-bbase my-app
9
+ ```
10
+
11
+ ## 功能特性
12
+
13
+ - ✅ 交互式模块选择
14
+ - ✅ Expo SDK 54 + Expo Router v5
15
+ - ✅ NativeWind v4 (Tailwind CSS)
16
+ - ✅ TypeScript 开箱即用
17
+ - ✅ 20+ 可选功能模块
18
+
19
+ ## 可选模块
20
+
21
+ ### P0 核心模块(默认选中)
22
+ | 模块 | 说明 |
23
+ |------|------|
24
+ | 网络请求 | TanStack Query 封装,统一拦截器、错误处理 |
25
+ | 状态管理 | Zustand stores 模板,persist 中间件 |
26
+ | 本地存储 | MMKV 封装,类型安全 API |
27
+
28
+ ### P1 功能模块
29
+ | 模块 | 说明 |
30
+ |------|------|
31
+ | Apple/iOS 支付 | react-native-iap 封装 |
32
+ | 表单验证 | React Hook Form + Zod |
33
+ | 图片 | expo-image 封装 |
34
+ | 视频 | expo-av 封装 |
35
+ | Google 登录 | @react-native-google-signin/google-signin |
36
+ | Facebook 登录 | expo-facebook |
37
+ | Apple 登录 | expo-apple-authentication |
38
+ | WebView 容器 | react-native-webview + JS Bridge |
39
+ | 多语言 | i18next + react-i18next |
40
+ | 动画/手势 | Reanimated 3 + Gesture Handler |
41
+
42
+ ### P2 扩展模块
43
+ | 模块 | 说明 |
44
+ |------|------|
45
+ | OTA 更新 | expo-updates |
46
+ | 应用内通知 | expo-notifications + 自定义组件 |
47
+ | 用户权限管理 | 权限请求/检查封装 |
48
+ | Bottom Sheet | @gorhom/bottom-sheet |
49
+ | FlashList | @shopify/flash-list |
50
+ | reactnative.reusables UI | 预置 UI 组件 |
51
+
52
+ ## 使用示例
53
+
54
+ ```bash
55
+ # 创建项目
56
+ npx expo-bbase my-awesome-app
57
+
58
+ # 进入项目目录
59
+ cd my-awesome-app
60
+
61
+ # 启动开发服务器
62
+ npx expo start
63
+ ```
64
+
65
+ ## CLI 选项
66
+
67
+ ```bash
68
+ npx expo-bbase <project-name> # 创建新项目
69
+ npx expo-bbase create <name> # 等同于上面的命令
70
+ npx expo-bbase --version # 显示版本号
71
+ npx expo-bbase --help # 显示帮助信息
72
+ ```
73
+
74
+ ## 开发
75
+
76
+ ```bash
77
+ # 安装依赖
78
+ npm install
79
+
80
+ # 开发模式(监听文件变化)
81
+ npm run dev
82
+
83
+ # 构建
84
+ npm run build
85
+ ```
86
+
87
+ ## 项目结构(生成项目)
88
+
89
+ ```
90
+ my-app/
91
+ ├── app/ # Expo Router 页面
92
+ │ ├── _layout.tsx
93
+ │ ├── (tabs)/
94
+ │ │ ├── _layout.tsx
95
+ │ │ ├── index.tsx
96
+ │ │ └── explore.tsx
97
+ │ └── +not-found.tsx
98
+ ├── src/
99
+ │ ├── api/ # 网络请求 (可选)
100
+ │ ├── stores/ # 状态管理 (可选)
101
+ │ ├── storage/ # 本地存储 (可选)
102
+ │ ├── modules/ # 功能模块 (可选)
103
+ │ ├── components/ # 公共组件
104
+ │ ├── hooks/ # 自定义 Hooks
105
+ │ ├── constants/ # 常量
106
+ │ └── types/ # 类型定义
107
+ ├── assets/ # 静态资源
108
+ ├── app.json # Expo 配置
109
+ ├── babel.config.js # Babel 配置
110
+ ├── metro.config.js # Metro 配置
111
+ ├── tailwind.config.js # Tailwind 配置
112
+ ├── tsconfig.json # TypeScript 配置
113
+ └── package.json # 项目依赖
114
+ ```
115
+
116
+ ## License
117
+
118
+ MIT
package/bin/cli.js ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ require("../dist/index.js");