~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0
main
16 lines · 774 B Raw History
#!/bin/sh
# Builds examples/marque-fedproxy-ingress/dist/: modules + sessions at the atlibs.lock.json pins, stage.json, the page.
#   scripts/stage.sh [--origin https://host/path/]
set -eu
cd "$(dirname "$0")/../examples/marque-fedproxy-ingress"
origin=
case ${1-} in
--origin) origin=$2 ;;
'') ;;
*) echo "usage: $0 [--origin https://host/path/]" >&2; exit 2 ;;
esac
atlibs add $(jq -r '.modules[] | select(.ref) | (.ref | split("@")[0]) + "@" + .pin' atlibs.lock.json)
rm -rf dist
if ! err=$(atlibs stage --target spa ${origin:+--origin "$origin"} --out dist 2>&1 >/dev/null); then echo "$err" >&2; exit 1; fi
cp index.html main.js serve.js dist/
[ -n "$origin" ] && echo "built dist/ for $origin" || echo "built dist/ for 127.0.0.1 (deploy: --origin https://host/path/)"