callstack / callstack/react-native-paper
Include `cross-env` as devDependency to the example project
- 主要语言
- TypeScript
- 星标
- 14.5k
- 派生
- 2.2k
- 平均合并
- 5 天 23 小时
- 30 天内合并 PR
- 12
描述
**Is your feature request related to a problem? Please describe.**
It's not exactly a problem, but the usage of environment variables on scripts in the example project does not work on all platforms (e.g. Windows).
**Describe the solution you'd like**
Using `cross-env` package, it would be possible to run on all environments.
**Describe alternatives you've considered**
The alternative is to manually changing the scripts to match your development platform requirements before running any command and being careful not to commit the changes.
**Additional context**
You can check the `cross-env` package on NPM [here](https://www.npmjs.com/package/cross-env). And the scripts could be changed to:
```diff
"scripts": {
"eas-build-pre-install": "cd .. && yarn",
- "start": "EXPO_NO_TYPESCRIPT_SETUP=1 expo start",
- "android": "EXPO_NO_TYPESCRIPT_SETUP=1 expo start --android",
- "android:native": "EXPO_NO_TYPESCRIPT_SETUP=1 expo run:android",
- "ios": "EXPO_NO_TYPESCRIPT_SETUP=1 expo start --ios",
- "web": "EXPO_NO_TYPESCRIPT_SETUP=1 expo start --web"
+ "start": "cross-env EXPO_NO_TYPESCRIPT_SETUP='1' expo start",
+ "android": "cross-env EXPO_NO_TYPESCRIPT_SETUP='1' expo start --android",
+ "android:native": "cross-env EXPO_NO_TYPESCRIPT_SETUP='1' expo run:android",
+ "ios": "cross-env EXPO_NO_TYPESCRIPT_SETUP='1' expo start --ios",
+ "web": "cross-env EXPO_NO_TYPESCRIPT_SETUP='1' expo start --web"
},
```
贡献指南
调研方向
找到示例项目的包清单,并检查其中列出的 start、Android、iOS 和 web 脚本。添加所请求的开发依赖项,并验证每个受影响的命令都使用它来处理跨平台环境变量。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- react-native
- 领域
- build-system
- Issue 类型
- 功能
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 48/100