Created
March 12, 2017 21:07
-
-
Save kfatehi/314967b90ec7bf8d226a32c091eaf800 to your computer and use it in GitHub Desktop.
generate matrix-js-sdk docset
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
DOCSET_NAME="MatrixJSSDK" | |
cat <<EOF > docset-config.json | |
{ | |
"docset" : { | |
"name": "$DOCSET_NAME", | |
"icon": "scripts/icon.png" | |
} | |
} | |
EOF | |
NAME=`jq -r '.name' package.json` | |
VERSION=`jq -r '.version' package.json` | |
TMPL="node_modules/jsdoc-dash-template" | |
if [[ ! -d $TMPL ]]; then | |
yarn add jsdoc-dash-template | |
fi | |
echo "generating docset" | |
jsdoc -c docset-config.json -r lib -P package.json -R README.md -d docset -t $TMPL --pedantic | |
rm docset-config.json | |
DOCROOT=docset/MatrixJSSDK.docset/Contents/Resources/Documents/ | |
# move the docs so the index path matches the actual path | |
mv $DOCROOT/$NAME/$VERSION/* $DOCROOT/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment