Skip to content

Commit

Permalink
feat(scripts): Custom paths to misti/souffle.js
Browse files Browse the repository at this point in the history
  • Loading branch information
jubnzv committed Nov 12, 2024
1 parent f5ce466 commit d1ad213
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
#!/usr/bin/env bash
set -eou pipefail

# Use paths from environment variables if set
MISTI_PATH=${MISTI_PATH:-../misti}
SOUFFLE_PATH=${SOUFFLE_PATH:-../souffle.js}
CUSTOM_CSS_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../src/css/typedoc-custom.css"

echo 'Generating Misti TypeDoc documentation...'
pushd ../misti
yarn docs --customCss ../nowarp.github.io/src/css/typedoc-custom.css
pushd "$MISTI_PATH"
yarn docs --customCss "$CUSTOM_CSS_PATH"
popd > /dev/null
rm -rf static/tools/misti/api
mkdir -pv static/tools/misti
mv ../misti/docs/api static/tools/misti/
mv "$MISTI_PATH/docs/api" static/tools/misti/

echo 'Generating Souffle.js TypeDoc documentation...'
pushd ../souffle.js
yarn docs --customCss ../nowarp.github.io/src/css/typedoc-custom.css
pushd "$SOUFFLE_PATH"
yarn docs --customCss "$CUSTOM_CSS_PATH"
popd > /dev/null
rm -rf static/lib/souffle-js/api
mkdir -pv static/lib/souffle-js
mv ../souffle.js/docs/api static/lib/souffle-js/
mv "$SOUFFLE_PATH/docs/api" static/lib/souffle-js/

echo 'Generating docusaurus documentation...'
rm -rf ./build
docusaurus build --out-dir build/

0 comments on commit d1ad213

Please sign in to comment.