Something went wrong. Try again.
[READ-ONLY]
a fast, modern browser for the npm registry forked from npmx.dev/npmx.dev
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738#!/bin/bash# Run Lighthouse CI audits.## Modes:# - Accessibility (default): requires LIGHTHOUSE_COLOR_MODE (dark/light)# - Performance: set LH_PERF=1 (no color mode needed)## The LIGHTHOUSE_COLOR_MODE env var is read by lighthouse-setup.cjs# to set the appropriate theme before each audit.
set -e
if [ -n "${LH_PERF}" ]; then echo "⚡ Running Lighthouse performance audit (CLS)..." pnpx @lhci/cli autorun --upload.githubStatusContextSuffix="/perf" echo "" echo "✅ Performance audit completed" exit 0fi
case "${LIGHTHOUSE_COLOR_MODE}" in dark) echo "🌙 Running Lighthouse accessibility audit (dark mode)..." pnpx @lhci/cli autorun --upload.githubStatusContextSuffix="/dark" ;; light) echo "☀️ Running Lighthouse accessibility audit (light mode)..." pnpx @lhci/cli autorun --upload.githubStatusContextSuffix="/light" ;; *) echo "⚠️ Missing or invalid LIGHTHOUSE_COLOR_MODE. Use 'dark' or 'light'." exit 1 ;;esac
echo ""echo "✅ Accessibility audit completed"