-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenerate.sh
More file actions
31 lines (23 loc) · 1.18 KB
/
generate.sh
File metadata and controls
31 lines (23 loc) · 1.18 KB
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
#!/bin/bash
if [ -f .env ]
then
export $(cat .env | sed 's/#.*//g' | xargs)
fi
if [ -z ${DOC_ROOT} ]; then
echo "DOC_ROOT should be set in .env. Point it to the documentation version root."
exit
fi
if [ -z ${BREADBOARD_SOURCE} ]; then
echo "BREADBOARD_SOURCE should be set in .env. Point it to the breadboard source code directory."
exit
fi
echo "Reading source from $BREADBOARD_SOURCE"
echo "Writing output to $DOC_ROOT"
# groovydoc --destdir temp -nomainforscripts ../breadboard/groovy/form/*.groovy ../breadboard/groovy/util/*.groovy ../breadboard/groovy/timer/*.groovy ../breadboard/groovy/actions/*.groovy ../breadboard/groovy/steps/*.groovy ../breadboard/groovy/chat/*.groovy ../breadboard/groovy/graph/*.groovy
rm -rf temp
# Generate frontend breadboard class documentation
npx typedoc --tsconfig "$BREADBOARD_SOURCE/frontend/tsconfig.json" "$BREADBOARD_SOURCE/frontend/core/breadboard.ts"
# Prepend ./snippets/core.md and then append concatenated typedoc output
npx concat-md --decrease-title-levels temp | (cat ./snippets/core.md && cat) | (cat ./snippets/generated.md && cat) > "$DOC_ROOT/api/frontend/core.md"
# Generate documentation for Vue components
node generate.vue.js