veza/tmt/tests/frontend/no_critical_js.sh
senke ad60247f33 feat: global update including storybook setup and backend fixes
- Web: Setup Storybook, added addons, configured Tailwind, added stories for UI components.
- Backend: Updated API router, database, workers, and auth in common.
- Stream Server: Removed SQLx queries and updated auth.
- Docs & Scripts: Updated documentation and recovery scripts.
2026-02-02 19:34:14 +01:00

31 lines
836 B
Bash
Executable file

#!/bin/bash
set -e
REPO_ROOT=$(git rev-parse --show-toplevel)
WEB_DIR="$REPO_ROOT/apps/web"
INDEX_HTML="$WEB_DIR/index.html"
echo "📍 Frontend No-Critical-JS Check"
if [ ! -f "$INDEX_HTML" ]; then
echo "❌ index.html not found!"
exit 1
fi
echo "🔎 Checking for <noscript> tag in index.html..."
if grep -q "<noscript>" "$INDEX_HTML"; then
echo "✅ <noscript> tag found."
else
echo "❌ <noscript> tag MISSING. The app is invisible without JS."
echo " Please add a <noscript> tag with a basic message."
exit 1
fi
# Optional: Check if root is not empty (SSR/Prerendering check)
# This is stricter, maybe for later.
# if grep -Pqz '<div id="root">.+</div>' "$INDEX_HTML"; then
# echo "✅ Root div has initial content."
# else
# echo "⚠️ Root div is empty (Client-side rendering only)."
# fi