Skip to content
This repository was archived by the owner on Nov 20, 2024. It is now read-only.

Commit 467b6a3

Browse files
committed
Update readme
1 parent 5aac860 commit 467b6a3

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

README.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,38 @@
1616
<dd>Helps maintain a readable code, easy to fix and more room to add new features.</dd>
1717

1818
<dt>Open Source</dt>
19-
<dd>Any piece of code is free to use anywhere except UI Designs you've to ask permission from relevant designers. Designer's information can be found in app.</dd>
19+
<dd>Any piece of code is free to use anywhere except music you've to give credits to the creator in order to use them. Information can be found in app.</dd>
2020
</dl>
2121

2222
## Requirements to run locally
2323

2424
> Just in case if you ran into errors make sure you're using correct react-native & nodejs version.
2525
26-
- Run `npm run setup` to install required global npm packages with correct versions
26+
- Run `npm run setup` to install required global npm packages with correct versions.
27+
- Run `npx jetifier` to convert native libraries to AndroidX.
28+
- Run `npm start` to start the bundling server.
29+
- Run `npm run android` to build debug app for android.
30+
- Run `npm run ios` to build debug app for iOS.
2731

2832
## Getting started with code
2933

3034
> Please note that this project's code is not meant for beginners! If you're just getting started with React Native I recommend you to explore some ToDo and basic setState apps and get yourself familiar with react eco-system becuase in this project intermediate and advance implementations are use which will confuse you and won't help much in terms of learning.
3135
3236
- `init.js` initialize default settings like styles, theme & API.
37+
- `index.js` initialize root components like `Themes`, `Settings` & `Navigator`.
38+
- `configs/index.js` holds app's & level's theme.
39+
- `contexts/Settings/index.js` is responsible for chaning/cache game's music track & volume.
40+
- `contexts/Theme/index.js` is responsible for chaning/cache app's dark/light mode.
41+
- `engine` is responsible for game's logic.
42+
- `utils/index.js` holds custom general functions.
43+
- `utils/ui.js` holds custom UI related functions.
44+
- `utils/fonts.js`
45+
- One of the fruits of using react-native is framework doesn't register custom font's weight automatically.
46+
- So in order to change font weight your to use complete font family name+prefix eg `Muli-Bold`.
47+
- This file helps us get correct font family name according to font weight.
48+
- Please also beware for iOS & android font family naming conflicts. <a href="https://medium.com/@mehran.khan/ultimate-guide-to-use-custom-fonts-in-react-native-77fcdf859cf4" target="_medium">READ MORE</a>
49+
50+
> **Reason I didn't use redux is, App isn't heavily relied on shared state in between screen. Only shared data is theme mode & music controls which are implemented with context in few lines of code. So using redux seems like a overkill for this small scale project**
3351
3452

3553
## Show support

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"start": "npx react-native start",
1111
"setup-ios": "cd node_modules/react-native && scripts/ios-install-third-party.sh && cd third-party/glog-0.3.5/ && ../../scripts/ios-configure-glog.sh",
1212
"setup-pods": "cd ios && pod install",
13-
"ios": "npx react-native run-ios --simulator=\"iPhone 8\"",
13+
"ios": "npx react-native run-ios",
1414
"ios-link": "cd ios && pod install && cd .. && npm run ios",
1515
"android": "npx react-native run-android",
1616
"bundle": "cd android && ./gradlew bundleRelease",

0 commit comments

Comments
 (0)