Skip to content

Commit acf3a82

Browse files
committed
update documentation and add github action
1 parent 558e89d commit acf3a82

File tree

7 files changed

+87
-3
lines changed

7 files changed

+87
-3
lines changed

.github/workflows/documentation.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: documentation
2+
3+
on:
4+
pull_request:
5+
branches: [master]
6+
push:
7+
branches: [master]
8+
9+
jobs:
10+
checks:
11+
if: github.event_name != 'push'
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v1
15+
- uses: actions/setup-node@v1
16+
with:
17+
node-version: '12.x'
18+
- name: Test Build
19+
run: |
20+
if [ -e yarn.lock ]; then
21+
yarn install --frozen-lockfile
22+
elif [ -e package-lock.json ]; then
23+
npm ci
24+
else
25+
npm i
26+
fi
27+
npm run build
28+
gh-release:
29+
if: github.event_name != 'pull_request'
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v1
33+
- uses: actions/setup-node@v1
34+
with:
35+
node-version: '12.x'
36+
- name: Add key to allow access to repository
37+
env:
38+
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
39+
run: |
40+
mkdir -p ~/.ssh
41+
ssh-keyscan github.com >> ~/.ssh/known_hosts
42+
echo "${{ secrets.GH_PAGES_DEPLOY }}" > ~/.ssh/id_rsa
43+
chmod 600 ~/.ssh/id_rsa
44+
cat <<EOT >> ~/.ssh/config
45+
Host github.com
46+
HostName github.com
47+
IdentityFile ~/.ssh/id_rsa
48+
EOT
49+
- name: Release to GitHub Pages
50+
env:
51+
USE_SSH: true
52+
GIT_USER: git
53+
run: |
54+
git config --global user.email "[email protected]"
55+
git config --global user.name "gh-actions"
56+
if [ -e yarn.lock ]; then
57+
yarn install --frozen-lockfile
58+
elif [ -e package-lock.json ]; then
59+
npm ci
60+
else
61+
npm i
62+
fi
63+
npx docusaurus deploy

documentation/docs/1_Introduction/1_1_RNBoilerplate.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ title: React Native Boilerplate
1010
This project is a [React Native](https://facebook.github.io/react-native/) boilerplate that can be used to kick-start a mobile application.
1111

1212
The boilerplate provides **an architecture optimized for building solid cross-platform mobile applications** through separation of concerns between the UI and business logic.
13-
We made this documented so that each piece of code that lands in your application can be understood and used.
13+
We made this full documentation so that each piece of code that lands in your application can be understood and used.
1414

1515

1616
:::tip Don't forget !!
@@ -43,15 +43,15 @@ The driving goal of the architecture of the boilerplate is separation of concern
4343

4444
The boilerplate contains:
4545

46-
- a [React Native](https://facebook.github.io/react-native/) (v**0.63.2**) application (in "[ejected](https://github.com/react-community/create-react-native-app/blob/master/EJECTING.md)" mode to allow using dependencies that rely on native code)
46+
- a [React Native](https://facebook.github.io/react-native/) (v**0.63.3**) application (in "[ejected](https://github.com/react-community/create-react-native-app/blob/master/EJECTING.md)" mode to allow using dependencies that rely on native code)
4747
- a [clear directory layout](#directory-layout) to provide a base architecture for your application
4848
- [Redux](https://redux.js.org/) (v**4.0.5**) to help manage state
4949
- [Redux Persist](https://github.com/rt2zz/redux-persist) (v**6.0.0**) to persist the Redux state
5050
- [React Navigation](https://reactnavigation.org/) (v**5**) to handle routing and navigation in the app, with a splash screen setup by default
5151
- [redux toolkit](https://github.com/infinitered/reduxsauce) (v**1.4.0**) to make redux easier
5252
- [axios](https://github.com/axios/axios) (v**0.20.0**) to make API calls
5353
- [prettier](https://prettier.io/) and [eslint](https://eslint.org/) preconfigured for React Native
54-
- [react-native-flipper](https://fbflipper.com/) (v**0.57.0**) to debug react-native and [redux-flipper](https://github.com/jk-gan/redux-flipper) (v**1.3.2**) to debug redux
54+
- [react-native-flipper](https://fbflipper.com/) (v**0.62.0**) to debug react-native and [redux-flipper](https://github.com/jk-gan/redux-flipper) (v**1.3.2**) to debug redux
5555

5656
The boilerplate includes an example (displaying fake user data) from UI components to the business logic. The example is easy to remove so that it doesn't get in the way.
5757

documentation/docs/3_Guides/3_2_SplashScreenLoadingData.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ slug: /SplashScreenLoadingData
33
title: Splash screen & loading data
44
---
55

6+
🚧 It's a Work In Progress section 🚧
7+
68
In many applications, you need to load data from API before displaying any content.
79
To do that, we built a solid navigation based on a splash screen to load data before the content shows, and [inline require](https://reactnative.dev/docs/ram-bundles-inline-requires#inline-requires) to improve performance.
810

documentation/docs/3_Guides/3_3_AddAStore.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ slug: /AddAStore
33
title: Add a store
44
---
55

6+
🚧 It's a Work In Progress section 🚧
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
slug: /UsingFlipper
3+
title: Using Flipper
4+
---
5+
6+
Flipper is a debugger for React native and, with a plugin, for redux too.
7+
All you have to do is download [Flipper](https://fbflipper.com/). Afterinstalling it, in Flipper desktop client do:
8+
9+
```
10+
Manage Plugins > Install Plugins > search "redux-debugger" > Install
11+
```
12+
13+
That'is !
14+
<div align="center">
15+
<img src={require('../assets/Flipper.png').default} />
16+
</div>

documentation/docs/3_Guides/BetaBuild.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ slug: /BetaBuild
33
title: Beta build
44
---
55

6+
🚧 It's a Work In Progress section 🚧
7+
68
# Distributing beta builds
79

810
Developers love writing React Native code but no one likes deploying React Native app or distributing beta builds.

documentation/docs/assets/Flipper.png

89.7 KB
Loading

0 commit comments

Comments
 (0)