f97cf6eb38
shared/fabledsword.tokens.json mirrors web/src/lib/styles/tokens.json; assets/error-copy.json mirrors the web's error-code copy table; assets/svg/album-fallback.svg mirrors the web placeholder. Together these give Flutter the same visual + copy starting point as the SPA. tool/gen_tokens.dart emits lib/theme/tokens.dart from the JSON; the generated file is committed so CI can verify the JSON and the Dart file haven't drifted (gate added in Task 21). tool/sync_shared.sh mkdirs the shared/ + assets/ destinations before copying so the script works on a fresh checkout (the original plan-text shape only mkdir'd assets/svg). pubspec.yaml assets block uncommented now that the three asset paths exist on disk.
14 lines
460 B
Bash
Executable File
14 lines
460 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Copies shared assets from web/ into flutter_client/. Run before
|
|
# `flutter build` and as part of CI. Idempotent.
|
|
set -euo pipefail
|
|
|
|
cd "$(dirname "$0")/.."
|
|
|
|
mkdir -p shared assets/svg
|
|
cp ../web/src/lib/styles/tokens.json shared/fabledsword.tokens.json
|
|
cp ../web/src/lib/styles/error-copy.json assets/error-copy.json
|
|
cp ../web/static/placeholders/album-fallback.svg assets/svg/album-fallback.svg
|
|
|
|
echo "shared assets synced from web/"
|