|
16 | 16 | <dd>Helps maintain a readable code, easy to fix and more room to add new features.</dd>
|
17 | 17 |
|
18 | 18 | <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> |
20 | 20 | </dl>
|
21 | 21 |
|
22 | 22 | ## Requirements to run locally
|
23 | 23 |
|
24 | 24 | > Just in case if you ran into errors make sure you're using correct react-native & nodejs version.
|
25 | 25 |
|
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. |
27 | 31 |
|
28 | 32 | ## Getting started with code
|
29 | 33 |
|
30 | 34 | > 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.
|
31 | 35 |
|
32 | 36 | - `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** |
33 | 51 |
|
34 | 52 |
|
35 | 53 | ## Show support
|
|
0 commit comments