set shell := ["bash", "-euo", "pipefail", "-c"]

# Run the web server targeting the default relay.
default:
    just serve

# Run the web server targeting the specified relay.
# The vite config opens the watch, publish, and stats demos in separate tabs;

# set MOQ_NO_OPEN=1 to skip opening a browser.
serve url='http://localhost:4443': install
    VITE_RELAY_URL="{{ url }}" bun --bun vite

# Install the workspace deps that vite and the demo's imports need.
install:
    bun install
