#!/usr/bin/env bash # Run a command with the project's Node 24 toolchain, inside the official # Node image, so the host needs nothing but Docker. # # scripts/dev.sh npm install # scripts/dev.sh npm test # scripts/dev.sh npm run dev:server set -euo pipefail cd "$(dirname "$0")/.." tty_flag=() if [ -t 0 ] && [ -t 1 ]; then tty_flag=(-t); fi exec docker run --rm -i "${tty_flag[@]}" \ --user "$(id -u):$(id -g)" \ --network host \ -e HOME=/tmp \ -e npm_config_cache=/app/.npm-cache \ -e npm_config_update_notifier=false \ -e npm_config_fund=false \ -e npm_config_audit=false \ -e TZ="${TZ:-America/New_York}" \ -v "$PWD":/app -w /app \ node:24-bookworm-slim "$@"