Skip to content

Commit c6aa7e7

Browse files
[FCE-1189] Add server sdk API docs (#93)
## Description Add JS Server SDK into our main documentation (also update web and mobile modules) --------- Co-authored-by: Piotr Wodecki <44680063+PiotrWodecki@users.noreply.github.com>
1 parent 46e2dd1 commit c6aa7e7

File tree

9 files changed

+55
-3
lines changed

9 files changed

+55
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,3 +136,4 @@ build
136136

137137
docs/api/mobile/**
138138
docs/api/web/**
139+
docs/api/server/**

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@
44
[submodule "packages/mobile-client-sdk"]
55
path = packages/mobile-client-sdk
66
url = https://github.com/fishjam-cloud/mobile-client-sdk.git
7+
[submodule "packages/js-server-sdk"]
8+
path = packages/js-server-sdk
9+
url = https://github.com/fishjam-cloud/js-server-sdk.git

docusaurus.config.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ function injectTypeDocSidebar(items) {
2020
link: { type: "doc", id: "api/web/index" },
2121
items: require("./docs/api/web/typedoc-sidebar.cjs"),
2222
},
23+
{
24+
type: "category",
25+
label: "Server SDK for JS",
26+
link: { type: "doc", id: "api/server/index" },
27+
items: require("./docs/api/server/typedoc-sidebar.cjs"),
28+
},
2329
],
2430
};
2531
}
@@ -212,6 +218,19 @@ const config: Config = {
212218
...typedocConfig,
213219
},
214220
],
221+
[
222+
"docusaurus-plugin-typedoc",
223+
{
224+
id: "server-api",
225+
out: "docs/api/server",
226+
entryPoints: [
227+
"./packages/js-server-sdk/packages/js-server-sdk/src/index.ts",
228+
],
229+
tsconfig:
230+
"./packages/js-server-sdk/packages/js-server-sdk/tsconfig.json",
231+
...typedocConfig,
232+
},
233+
],
215234
],
216235
};
217236

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"write-translations": "docusaurus write-translations",
1414
"write-heading-ids": "docusaurus write-heading-ids",
1515
"prepare": "sh ./scripts/prepare.sh",
16+
"update-modules": "sh ./scripts/update.sh",
1617
"typecheck": "tsc",
1718
"format": "prettier . --write",
1819
"format:check": "prettier . --check",
@@ -56,4 +57,4 @@
5657
"node": ">=18.0"
5758
},
5859
"packageManager": "yarn@4.5.3"
59-
}
60+
}

packages/js-server-sdk

Submodule js-server-sdk added at 8fb05fd

scripts/prepare.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,10 @@ cd $ROOTDIR
1717

1818
cd packages/mobile-client-sdk/
1919
yarn
20+
21+
cd $ROOTDIR
22+
23+
cd packages/js-server-sdk/
24+
yarn && yarn build
25+
2026
printf "DONE\n"

scripts/update.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
ROOTDIR=$(dirname $(dirname "$(readlink -f $0)"))
6+
echo $ROOTDIR
7+
8+
cd $ROOTDIR
9+
cd packages/web-client-sdk/
10+
git checkout main
11+
git pull
12+
13+
cd $ROOTDIR
14+
cd packages/mobile-client-sdk/
15+
git checkout main
16+
git pull
17+
18+
cd $ROOTDIR
19+
cd packages/js-server-sdk/
20+
git checkout main
21+
git pull

0 commit comments

Comments
 (0)