create-expo-stack 项目教程
1. 项目目录结构及介绍
create-expo-stack/
├── base-template/
│ ├── .editorconfig
│ ├── .eslintrc.js
│ ├── .gitignore
│ ├── .lintstagedrc.js
│ ├── .prettierignore
│ ├── LICENSE
│ ├── README.md
│ ├── bun.lockb
│ ├── contributing.md
│ ├── package.json
│ ├── tsconfig.json
│ └── turbo.json
├── packages-template/
│ ├── expo-router/
│ ├── nativewind/
│ ├── restyle/
│ ├── tamagui/
│ └── unistyles/
├── scripts/
│ └── wwwwww
└── .github/
└── workflows/
目录结构介绍
- base-template/: 包含所有生成项目通用的文件,如配置文件、许可证、README 等。
- packages-template/: 包含与特定包相关的模板文件,如 Expo Router、NativeWind、Restyle、Tamagui 和 Unistyles。
- scripts/: 包含项目的脚本文件。
- .github/workflows/: 包含 GitHub Actions 的工作流配置文件。
2. 项目启动文件介绍
项目的启动文件通常位于 base-template/
目录下,主要包括以下文件:
- package.json: 定义了项目的依赖、脚本命令和其他元数据。
- tsconfig.json: TypeScript 的配置文件,定义了 TypeScript 编译器的选项。
- turbo.json: Turbo 的配置文件,用于管理项目的构建和部署流程。
3. 项目配置文件介绍
.editorconfig
用于统一不同编辑器和 IDE 的代码风格。
.eslintrc.js
ESLint 的配置文件,用于代码质量检查。
.gitignore
定义了 Git 版本控制系统忽略的文件和目录。
.lintstagedrc.js
用于在 Git 提交前对暂存区的文件进行 lint 检查。
.prettierignore
定义了 Prettier 忽略的文件和目录。
LICENSE
项目的许可证文件。
README.md
项目的说明文档,通常包含项目的介绍、安装和使用说明。
bun.lockb
Bun 的锁定文件,用于确保依赖版本的稳定性。
contributing.md
贡献指南,指导开发者如何为项目贡献代码。
package.json
项目的依赖管理文件,定义了项目的依赖、脚本命令和其他元数据。
tsconfig.json
TypeScript 的配置文件,定义了 TypeScript 编译器的选项。
turbo.json
Turbo 的配置文件,用于管理项目的构建和部署流程。
通过以上介绍,您可以更好地理解和使用 create-expo-stack
项目。