Skip to content

Commit

Permalink
❗ [fix]: Missing spec.json.
Browse files Browse the repository at this point in the history
  • Loading branch information
rolyp committed Dec 19, 2024
1 parent ed7a0ea commit c98f125
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 deletions.
33 changes: 16 additions & 17 deletions script/bundle-website.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,15 @@ while getopts "w:r:" opt; do
esac
done

CLEAN=./$PREFIX/script/util/clean.sh
LISP_CASE=./$PREFIX/script/util/lisp-case.sh
DIST="${PREFIX}dist"

SRC_PATH=${WEBSITE//./\/}
SRC_PATH_LISP_CASE=$($LISP_CASE "$SRC_PATH")
echo "$SRC_PATH -> $SRC_PATH_LISP_CASE"
./$PREFIX/script/util/clean.sh $SRC_PATH_LISP_CASE

if [[ -e "website/$SRC_PATH.html" ]]; then
$CLEAN $SRC_PATH_LISP_CASE
cp website/$SRC_PATH.html dist/$SRC_PATH_LISP_CASE/index.html
fi

Expand All @@ -32,23 +31,23 @@ done | sort -u))
set -x

for PAGE in "${PAGES[@]}"; do
MODULE=$WEBSITE.$PAGE
SRC_PATH=${MODULE//./\/}
SRC_PATH_LISP_CASE=$($LISP_CASE "$SRC_PATH")
echo "$SRC_PATH -> $SRC_PATH_LISP_CASE"
MODULE=$WEBSITE.$PAGE
SRC_PATH=${MODULE//./\/}
SRC_PATH_LISP_CASE=$($LISP_CASE "$SRC_PATH")
echo "$SRC_PATH -> $SRC_PATH_LISP_CASE"
mkdir dist/$SRC_PATH_LISP_CASE

if [[ -e "website/$SRC_PATH.purs" ]]; then
. script/bundle-page.sh $WEBSITE.$PAGE
else
if [[ -e "website/$SRC_PATH.html" ]]; then
$CLEAN $SRC_PATH_LISP_CASE
cp website/$SRC_PATH.html dist/$SRC_PATH_LISP_CASE/index.html
fi
fi
if [[ -e "website/$SRC_PATH.purs" ]]; then
. script/bundle-page.sh $WEBSITE.$PAGE
else
if [[ -e "website/$SRC_PATH.html" ]]; then
cp website/$SRC_PATH.html dist/$SRC_PATH_LISP_CASE/index.html
fi
fi

if [[ -e "website/$SRC_PATH.json" ]]; then
cp website/$SRC_PATH.json dist/$SRC_PATH_LISP_CASE/spec.json
fi
if [[ -e "website/$SRC_PATH.json" ]]; then
cp website/$SRC_PATH.json dist/$SRC_PATH_LISP_CASE/spec.json
fi
done

WEBSITE_LISP_CASE=$($LISP_CASE "$WEBSITE")
Expand Down
2 changes: 1 addition & 1 deletion website/FluidOrg.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ <h4>Computational transparency as infrastructure</h4>
<script type="module">
import { drawCode, loadFigure } from "/shared/load-figure.js"
drawCode("fluid/example/plot")("non-renewables")();
loadFigure("")();
loadFigure("spec.json")();
</script>
</body>
</html>

0 comments on commit c98f125

Please sign in to comment.