Skip to content

Commit

Permalink
Better README is here
Browse files Browse the repository at this point in the history
  • Loading branch information
WrathChaos committed Aug 31, 2020
1 parent 58a4bed commit c7e177d
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 38 deletions.
2 changes: 1 addition & 1 deletion App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const App = () => {
}
setTimeout(() => {
setIsLoaded(true);
}, 750);
}, 1350);
}, []);

return (
Expand Down
97 changes: 63 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,57 @@
<img alt="React Native Pure Boilerplate" src="https://github.com/WrathChaos/react-native-pure-boilerplate/blob/master/assets/logo.png" width="1050"/>
<img alt="React Native Typescript Boilerplate" src="https://github.com/WrathChaos/react-native-typescript-boilerplate/blob/master/assets/logo.png" width="1050"/>

[![React Native Pure BoilerPlate](https://img.shields.io/badge/-React%20Native%20pure%20Boilerplate-lightgrey?style=for-the-badge)](https://github.com/WrathChaos/react-native-pure-boilerplate)
[![React Native Typescript Boilerplate](https://img.shields.io/badge/-React%20Native%20pure%20Boilerplate-lightgrey?style=for-the-badge)](https://github.com/WrathChaos/react-native-typescript-boilerplate)

[![npm version](https://img.shields.io/npm/v/react-native-pure-boilerplate.svg?style=for-the-badge)](https://www.npmjs.com/package/@freakycoder/react-native-pure-boilerplate)
[![npm](https://img.shields.io/npm/dt/react-native-pure-boilerplate.svg?style=for-the-badge)](https://www.npmjs.com/package/@freakycoder/react-native-pure-boilerplate)
[![npm version](https://img.shields.io/npm/v/react-native-typescript-boilerplate.svg?style=for-the-badge)](https://www.npmjs.com/package/@freakycoder/react-native-typescript-boilerplate)
[![npm](https://img.shields.io/npm/dt/react-native-typescript-boilerplate.svg?style=for-the-badge)](https://www.npmjs.com/package/@freakycoder/react-native-typescript-boilerplate)
![Platform - Android and iOS](https://img.shields.io/badge/platform-Android%20%7C%20iOS-blue.svg?style=for-the-badge)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg?style=for-the-badge)](https://opensource.org/licenses/MIT)
[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg?style=for-the-badge)](https://github.com/prettier/prettier)

<p align="center">
<img alt="React Native Pure Boilerplate"
src="assets/RN-Pure-Boilerplate.gif" height="650" />
<img alt="React Native Typescript Boilerplate"
src="assets/RN-Typescript-Boilerplate.gif" />
</p>

# Installation

You can simply clone the project and start with your barebone project

```sh
git clone [email protected]:WrathChaos/react-native-pure-boilerplate.git my-app-name
git clone [email protected]:WrathChaos/react-native-typescript-boilerplate.git my-app-name
```

### Clean-Up & Simple Run

Clean up the files from the example repository and do not forget to install the dependencies

```sh
rm -rf .git README.md
npm i
react-native run-ios/android
```
- `rm -rf .git README.md`
- `npm i`
- `npx pod-install` (iOS Only)
- `react-native run-ios/android`

# What's Included?

- React Navigation V5
- API Usage Service
- Ready to use Styles
- Built-in Theme System
- Build-in Animated Splash Screen
- Local Storage Utils Functions
- HTTP Network Management (Axios)
- Built-in EventEmitter (EventBus)
- Ready to see Stack and Tab Screens with navigation
- Babel Plugin Module Resolver to fix the relative path problem (visit .babelrc)
- **Navigation System**
- React Navigation V5
- React Navigation Helpers
- Ready to use Stack and Tab Screens with navigation
- **Built-in Theme System**
- Colors
- Fonts
- Built-in TextWrapper for better Custom Text usage
- **Built-in Animated Splash Screen**
- **Local Storage Ready to Use Util Functions**
- **HTTP Network Management**
- Axios
- API Service with Usage Examples
- **Built-in EventEmitter**
- EventBus
- **Babel Plugin Module Resolver**
- Fixing the relative path problem
- Visit `.babelrc` to ready to use and more customization
- **Built-in Custom Font Implementation**
- All you need to do is copy-paste the .tff file and run `npx react-native-asset` command

# Step By Step Guide

Expand All @@ -60,15 +69,15 @@ npx react-native-rename <your-project-name> -b <bundleIdentifier>

### Install Pods (iOS Only)

- npm i
- cd ios && pod install
- cd .. && react-native run-ios/android
- `npm i`
- `cd ios && pod install`
- `cd .. && react-native run-ios/android`

### Android local.properties (Android Only)

- npm i
- cd android && mkdir local.properties
- nano local.properties
- `npm i`
- `cd android && mkdir local.properties`
- `nano local.properties`

#### Example of MacOS Android SDK Path

Expand All @@ -79,25 +88,45 @@ ndk.dir=/Users/your-name/Library/Android/sdk/ndk-bundle
sdk.dir=/Users/your-name/Library/Android/sdk
```

- cd .. & react-native run-ios/android
- `cd .. & react-native run-ios/android`

# Components

## Styles

- colors
- fonts
- theme
- font-size
- **TextWrapper** over default Text component
- Colors
- Fonts
- Theme
- Tont-size

## Imports

Predefined **`h`** tags are usable with TextWrapper

```jsx
import Text from "@shared-components/TextWrapper/Text";

// ? Advanced Usage Example
<Text h3 bold right color="#913400" numberOfLines={1} style={{ margin: 16 }}>
Heading 3 Bold Right Sided Custom Text
</Text>;
```

```jsx
import colors from "@colors";

<Text h1 color={colors.light.primary}>
Heading 1 with custom color from theme
</Text>;
```

```jsx
import fonts from "@fonts";

<Text h5 fontFamily={fonts.helvetica.regular}>
Heading 1 with custom font usage
</Text>;
```

```jsx
Expand Down Expand Up @@ -130,4 +159,4 @@ FreakyCoder, [email protected]

## License

React Native Pure Boilerplate is available under the MIT license. See the LICENSE file for more info.
React Native Typescript Boilerplate is available under the MIT license. See the LICENSE file for more info.
Binary file removed assets/RN-Pure-Boilerplate.gif
Binary file not shown.
Binary file added assets/RN-Typescript-Boilerplate.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "RNTypescriptBoilerplate",
"version": "0.0.1",
"private": true,
"name": "react-native-typescript-boilerplate",
"version": "1.0.0",
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
Expand Down

0 comments on commit c7e177d

Please sign in to comment.