Skip to content

Commit 8354897

Browse files
committed
docs: Update prepareDocdash.sh and remove README.md
1 parent 98a6b18 commit 8354897

File tree

2 files changed

+54
-145
lines changed

2 files changed

+54
-145
lines changed

internal/documentation/jsdoc/docdash/README.md

Lines changed: 0 additions & 142 deletions
This file was deleted.

internal/documentation/scripts/prepareDocdash.sh

Lines changed: 54 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,63 @@
22
#
33
# Prepares docdash for jsdoc generation by applying patches for VitePress-compatible Markdown output.
44
#
5-
set -euo pipefail
5+
set -o pipefail
66

77
DOCDASH_PATH="$(npm list docdash --parseable)"
88
DOCDASH_DESTINATION="jsdoc/docdash"
99

10-
cp -R "jsdoc/patches/tmpl" "$DOCDASH_DESTINATION/tmpl"
11-
cp "$DOCDASH_PATH/publish.js" "$DOCDASH_DESTINATION/"
10+
echo "Preparing docdash for jsdoc generation"
11+
echo ""
12+
echo "Docdash Path: $DOCDASH_PATH"
13+
echo "Docdash Destination: $DOCDASH_DESTINATION"
14+
echo "Current Directory: $(pwd)"
15+
echo ""
1216

17+
echo ""
18+
echo "Clearing docdash destination folder"
19+
rm -R "$DOCDASH_DESTINATION" -v
20+
21+
echo ""
22+
echo "Copying docdash to destination"
23+
cp -Rv "$DOCDASH_PATH" "$DOCDASH_DESTINATION"
24+
25+
echo ""
26+
echo "Clearing stock docdash templates"
27+
rm -Rv "$DOCDASH_DESTINATION/tmpl"
28+
29+
echo ""
30+
echo "Copying modified templates to docdash"
31+
cp -Rv "jsdoc/patches/tmpl" "$DOCDASH_DESTINATION/tmpl"
32+
cp -v "$DOCDASH_PATH/publish.js" "$DOCDASH_DESTINATION/"
33+
cat > jsdoc/docdash/README.md << 'EOF'
34+
This folder includes files from [docdash 2.0.2](https://github.com/clenemt/docdash/tree/bee5d0789068be6a1e01ce02968b23dd021b4fb6), which is a documentation template for JSDoc.
35+
36+
These files have been modified to change the output from HTML to Markdown, and to remove unnecessary features for our use case.
37+
38+
## Modifications by SAP
39+
* Output Markdown instead of HTML (Modified all templates)
40+
* Removed navbar functionality from publish.js
41+
* Removed static files functionality from publish.js
42+
* Modified js links to link to GitHub
43+
* Modified internal linking
44+
45+
## Contributors
46+
47+
Thanks to [lodash](https://lodash.com) and [minami](https://github.com/nijikokun/minami).
48+
49+
## License
50+
Licensed under the Apache License, version 2.0. (see [Apache-2.0](LICENSE.md)).
51+
EOF
52+
cat > jsdoc/docdash/package.json << 'EOF'
53+
{
54+
"type": "commonjs"
55+
}
56+
EOF
57+
58+
echo ""
59+
echo "Removing unneeded files from docdash"
60+
rm -Rv $DOCDASH_DESTINATION/static
61+
62+
echo ""
63+
echo "Applying patches to docdash"
1364
git apply jsdoc/patches/publish.js.patch

0 commit comments

Comments
 (0)