2026-04-28 17:26:00 -07:00
|
|
|
#!/bin/sh
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
|
|
RIBBIT_DIR="lib/ribbit"
|
|
|
|
|
STATIC_DIR="src/ttfrog/themes/default/static"
|
|
|
|
|
|
2026-04-28 17:32:15 -07:00
|
|
|
missing=""
|
|
|
|
|
command -v node >/dev/null 2>&1 || missing="$missing node"
|
|
|
|
|
command -v npm >/dev/null 2>&1 || missing="$missing npm"
|
|
|
|
|
|
|
|
|
|
if [ -n "$missing" ]; then
|
|
|
|
|
echo ""
|
|
|
|
|
echo "WARNING: ribbit build skipped — missing dependencies:$missing"
|
|
|
|
|
echo "Install Node.js to enable ribbit builds: https://nodejs.org"
|
|
|
|
|
echo ""
|
|
|
|
|
exit 0
|
|
|
|
|
fi
|
|
|
|
|
|
2026-04-28 17:26:00 -07:00
|
|
|
echo "Building ribbit..."
|
|
|
|
|
cd "$RIBBIT_DIR"
|
|
|
|
|
npm install --silent
|
|
|
|
|
npm run build --silent
|
|
|
|
|
cd - > /dev/null
|
|
|
|
|
|
|
|
|
|
echo "Copying ribbit dist files..."
|
2026-04-28 17:32:15 -07:00
|
|
|
cp -r "$RIBBIT_DIR/dist/." "$STATIC_DIR/"
|
2026-04-28 17:26:00 -07:00
|
|
|
|
|
|
|
|
echo "ribbit build complete."
|