Skip to content

Commit d3dda23

Browse files
committed
docs: added documentation website
1 parent a93aed9 commit d3dda23

File tree

119 files changed

+13829
-143
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+13829
-143
lines changed

.github/workflows/deployment.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build:
10+
name: Build Docusaurus
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
- uses: actions/setup-node@v4
17+
with:
18+
node-version: 18
19+
cache: yarn
20+
21+
- name: Install dependencies
22+
working-directory: website
23+
run: yarn install --frozen-lockfile
24+
- name: Build website
25+
working-directory: website
26+
run: yarn build
27+
28+
- name: Upload Build Artifact
29+
uses: actions/upload-pages-artifact@v3
30+
with:
31+
path: website/build
32+
33+
deploy:
34+
name: Deploy to GitHub Pages
35+
needs: build
36+
37+
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
38+
permissions:
39+
pages: write # to deploy to Pages
40+
id-token: write # to verify the deployment originates from an appropriate source
41+
42+
# Deploy to the github-pages environment
43+
environment:
44+
name: github-pages
45+
url: ${{ steps.deployment.outputs.page_url }}
46+
47+
runs-on: ubuntu-latest
48+
steps:
49+
- name: Deploy to GitHub Pages
50+
id: deployment
51+
uses: actions/deploy-pages@v4

.github/workflows/documentation.yml

-56
This file was deleted.

.gitignore

+22-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Pods/
4141

4242
# node.js
4343
#
44-
node_modules/
44+
node_modules
4545
npm-debug.log
4646
yarn-debug.log
4747
yarn-error.log
@@ -56,3 +56,24 @@ android/keystores/debug.keystore
5656

5757
# generated by bob
5858
lib/
59+
60+
# Dependencies
61+
docs/node_modules
62+
63+
# Production
64+
docs//build
65+
66+
# Generated files
67+
docs/.docusaurus
68+
docs/.cache-loader
69+
70+
# Misc
71+
docs/.DS_Store
72+
docs/.env.local
73+
docs/.env.development.local
74+
docs/.env.test.local
75+
docs/.env.production.local
76+
77+
docs/npm-debug.log*
78+
docs/yarn-debug.log*
79+
docs/yarn-error.log*

biome.json

+10-4
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
"indentStyle": "space",
99
"lineEnding": "lf",
1010
"lineWidth": 80,
11-
"ignore": ["**/.github", "**/lib", "**/.expo"]
11+
"ignore": ["**/.github", "**/lib", "**/.expo", "**/website"]
1212
},
13-
"organizeImports": { "enabled": true },
13+
"organizeImports": { "enabled": true, "ignore": ["**/website"] },
1414
"linter": {
1515
"enabled": true,
1616
"rules": {
@@ -73,7 +73,7 @@
7373
"useValidTypeof": "warn"
7474
}
7575
},
76-
"ignore": ["**/node_modules/", "**/lib", "**/.expo"]
76+
"ignore": ["**/node_modules/", "**/lib", "**/.expo", "**/website"]
7777
},
7878
"javascript": {
7979
"jsxRuntime": "reactClassic",
@@ -100,6 +100,12 @@
100100
]
101101
},
102102
"files": {
103-
"ignore": ["**/node_modules/", "**/lib", "**/.expo", "./example"]
103+
"ignore": [
104+
"**/node_modules/",
105+
"**/lib",
106+
"**/.expo",
107+
"**/example",
108+
"**/website"
109+
]
104110
}
105111
}

package.json

+11-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77
"types": "lib/typescript/index.d.ts",
88
"react-native": "src/index.ts",
99
"source": "src/index.ts",
10-
"files": ["src", "lib", "mock.js"],
10+
"files": [
11+
"src",
12+
"lib",
13+
"mock.js"
14+
],
1115
"keywords": [
1216
"react-native",
1317
"ios",
@@ -37,6 +41,7 @@
3741
"bootstrap": "yarn install && yarn example"
3842
},
3943
"dependencies": {
44+
"@docusaurus/theme-search-algolia": "^3.5.2",
4045
"@gorhom/portal": "1.0.14",
4146
"invariant": "^2.2.4"
4247
},
@@ -78,6 +83,10 @@
7883
"react-native-builder-bob": {
7984
"source": "src",
8085
"output": "lib",
81-
"targets": ["commonjs", "module", "typescript"]
86+
"targets": [
87+
"commonjs",
88+
"module",
89+
"typescript"
90+
]
8291
}
8392
}

website/.gitignore

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

website/README.md

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Website
2+
3+
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
4+
5+
### Installation
6+
7+
```
8+
$ yarn
9+
```
10+
11+
### Local Development
12+
13+
```
14+
$ yarn start
15+
```
16+
17+
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
18+
19+
### Build
20+
21+
```
22+
$ yarn build
23+
```
24+
25+
This command generates static content into the `build` directory and can be served using any static contents hosting service.
26+
27+
### Deployment
28+
29+
Using SSH:
30+
31+
```
32+
$ USE_SSH=true yarn deploy
33+
```
34+
35+
Not using SSH:
36+
37+
```
38+
$ GIT_USER=<Your GitHub username> yarn deploy
39+
```
40+
41+
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.

website/babel.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
3+
};

0 commit comments

Comments
 (0)