19 lines
592 B
Bash
Executable File
19 lines
592 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
cd "$(cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && pwd)"
|
|
set -eo pipefail
|
|
|
|
VERSION="${1-release}"
|
|
|
|
if test "main-$VERSION.js" -ot "main.nim" \
|
|
|| test "main-$VERSION.js" -ot "main.nimle" \
|
|
|| test "main-$VERSION.js" -ot "main.nimja"
|
|
then
|
|
>&2 nimble js main -o:main-"$VERSION".js -d:"$VERSION"
|
|
fi
|
|
|
|
j2 -f json style.html.j2 <({
|
|
echo "card_js = $(cat main-"$VERSION".js | jq -s --raw-input);"
|
|
echo "card_css_style = $(sass --style expanded style.scss | jq -s --raw-input);"
|
|
} | gron -u) --filters ../../filters.py --customize ../../environ.py
|