Skip to content

Commit e312c65

Browse files
committed
docs: add table of contents to events and methods
There's 35 methods, so that ToC starts closed. Also adds instructions for testing docs locally in the README
1 parent 01b8d66 commit e312c65

File tree

4 files changed

+34
-2
lines changed

4 files changed

+34
-2
lines changed

README.md

+10
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,16 @@ npm run build
7272

7373
> if you are modifying the typescript files of the library (in `src/`) on the fly, you can run `npm run watch` instead. If you are modifying files from the native counterparts, you'll need to rebuild the whole app for your target environnement (`npm run android/ios`).
7474
75+
### Updating documentation
76+
77+
Edit files in `docs/`, then test locally with:
78+
```shell
79+
cd docs
80+
bundle install
81+
bundle exec jekyll serve --watch --baseurl /
82+
```
83+
Then open http://localhost:4000/
84+
7585
## Generate the native code from specs
7686
A react-native project is needed to generate the code via *codegen*.
7787

docs/Gemfile.lock

+4-2
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,17 @@ GEM
6464
rexml (3.3.9)
6565
rouge (3.30.0)
6666
safe_yaml (1.0.5)
67-
sass-embedded (1.58.3)
67+
sass-embedded (1.58.3-arm64-darwin)
68+
google-protobuf (~> 3.21)
69+
sass-embedded (1.58.3-x86_64-linux-gnu)
6870
google-protobuf (~> 3.21)
69-
rake (>= 10.0.0)
7071
terminal-table (3.0.2)
7172
unicode-display_width (>= 1.1.1, < 3)
7273
unicode-display_width (2.5.0)
7374
webrick (1.9.1)
7475

7576
PLATFORMS
77+
arm64-darwin-22
7678
arm64-darwin-23
7779
arm64-darwin-24
7880
x86_64-linux

docs/events.markdown

+10
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,17 @@ nav_order: 2
66
parent: Usage
77
---
88

9+
<details open markdown="block">
10+
<summary>
11+
Table of contents
12+
</summary>
13+
{: .text-delta }
14+
1. TOC
15+
{:toc}
16+
</details>
17+
918
# Events
19+
{: .no_toc }
1020

1121
Since react-native version 0.76, events are handled with specific methods that return the listener.
1222

docs/methods.markdown

+10
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,17 @@ nav_order: 1
66
parent: Usage
77
---
88

9+
<details markdown="block">
10+
<summary>
11+
Table of contents
12+
</summary>
13+
{: .text-delta }
14+
1. TOC
15+
{:toc}
16+
</details>
17+
918
# Methods
19+
{: .no_toc }
1020

1121
## start(options)
1222

0 commit comments

Comments
 (0)