callstack / callstack/react-native-paper
Include `cross-env` as devDependency to the example project
- Ngôn ngữ chính
- TypeScript
- Star
- 14.5k
- Fork
- 2.2k
- Merge trung bình
- 5 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 12
Mô tả
**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"
},
```
Hướng dẫn đóng góp
Hướng nghiên cứu
Tìm tệp manifest gói của dự án ví dụ và kiểm tra các script start, Android, iOS và web được liệt kê trong đó. Thêm dependency phát triển được yêu cầu và xác minh rằng mỗi lệnh bị ảnh hưởng đều sử dụng nó cho các biến môi trường đa nền tảng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- react-native
- Lĩnh vực
- build-system
- Loại issue
- Tính năng
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 48/100