Add browser playtest and improve library, media and input
Bundle web bootstrap, icons, local font fallbacks and hosting instructions. Add optimized WebP/MP3 packaging, asset checks and a browser narration regression tool. Support browser audio handoff and ad-free explained hints. Refresh the responsive bookshelf and reduce unnecessary app, narration and paper repaint work. Preserve deliberate page swipes while tolerating small mouse movements during cell and navigation clicks. Validation: all 77 Flutter tests pass; shell, JavaScript and Python scripts parse; locale and web manifests are valid JSON; git diff --check passes.
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
# Override FLUTTER_BIN when Flutter is not on PATH.
|
||||
flutter_bin="${FLUTTER_BIN:-flutter}"
|
||||
pub_options=()
|
||||
if [[ "${PUB_OFFLINE:-0}" == 1 ]]; then pub_options+=(--offline); fi
|
||||
"$flutter_bin" pub get "${pub_options[@]}"
|
||||
"$flutter_bin" build web --wasm --release --no-pub --no-web-resources-cdn --dart-define=WEB_OPTIMIZED_MEDIA=true "$@"
|
||||
python3 scripts/optimize_web_media.py build/web
|
||||
python3 scripts/check_web_assets.py build/web
|
||||
mkdir -p artifacts
|
||||
python3 - <<'PY'
|
||||
from pathlib import Path
|
||||
from zipfile import ZipFile, ZIP_DEFLATED
|
||||
|
||||
output = Path('artifacts/lumen-browser-playtest.zip')
|
||||
with ZipFile(output, 'w', ZIP_DEFLATED) as archive:
|
||||
for path in sorted(Path('build/web').rglob('*')):
|
||||
if path.is_file():
|
||||
archive.write(path, path.relative_to('build/web'))
|
||||
archive.write('docs/BROWSER_PLAYTEST.md', 'HOSTING.md')
|
||||
print(f'Browser playtest: {output.resolve()} ({output.stat().st_size / 1024**2:.1f} MiB)')
|
||||
PY
|
||||
Reference in New Issue
Block a user