#!/usr/bin/env bash
set -eu
# Run from a checkout root. Supply its isolated T3 home and a synthetic project directory.
t3_home=$1
project_dir=$2
mkdir -p "$project_dir"
git -C "$project_dir" init -q
cp "$(dirname "$0")/local-page.html" "$project_dir/index.html"
node apps/server/src/bin.ts project add --base-dir "$t3_home" --title 'Browser demo' "$project_dir"
# In another terminal, serve this synthetic project with:
# cd "$project_dir" && python3 -m http.server 7568 --bind 127.0.0.1
# Open a new thread in Browser demo, Toggle right panel -> Browser.
