-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathbuild-docs.sh
More file actions
executable file
·34 lines (29 loc) · 1008 Bytes
/
build-docs.sh
File metadata and controls
executable file
·34 lines (29 loc) · 1008 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env bash
set -e
cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"/../
python3 dev/build-example-docs.py
# Build TS docs
cd ts && \
pnpm build:docs --readme none --name "TypeScript API" && \
cd ..
# Build Swift docs
cd .. && \
sourcedocs generate --module-name FlowerIntelligence -- -scheme flower -destination 'platform=macOS' && \
mkdir -p intelligence/docs/source/swift-api-ref && \
cp -r Documentation/Reference/* intelligence/docs/source/swift-api-ref/ && \
cd intelligence/docs && \
mv source/swift-api-ref/README.md source/swift-api-ref/index.md && \
sed -i.bak '1 s/^# .*/# Swift API/' source/swift-api-ref/index.md && \
sed -i.bak '/^This file was generated by/d' source/swift-api-ref/index.md && \
rm -f source/swift-api-ref/index.md.bak
{
echo ''
echo '```{toctree}'
echo ':hidden:'
echo ':maxdepth: 2'
echo ':glob:'
echo ''
echo '*/*'
echo '```'
} | tee -a source/ts-api-ref/index.md source/swift-api-ref/index.md
make html