#!/usr/bin/env bash cd "$(cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && pwd)" set -eo pipefail if test "main.js" -ot "main.nim" \ || test "main.js" -ot "main.nimle" \ || test "main.js" -ot "main.nimja" then >&2 nimble js main -d:${1-release} fi j2 -f json style.html.j2 <({ echo "card_js = $(cat main.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