Files
edgeever/apps/ios/Scripts/build-editor-bundle.sh
T
tianma-if cd4f010d8f feat(ios): add native SwiftUI client with Android UI parity
Replace the abandoned RN iOS path with a SwiftUI app (iOS 17+) that reuses
the shared TipTap editor bundle, GRDB local mirror/outbox, and Android-aligned
shell chrome for list, create, detail, and Me. Package the editor HTML in the
app resources so Markdown renders, present edit from the workspace root with a
UIKit FAB, and keep caret stable while typing.
2026-08-07 02:52:01 +08:00

32 lines
828 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
SRC="$ROOT/EditorSource"
OUT="$ROOT/EditorBundle"
cd "$SRC"
if ! command -v bun >/dev/null 2>&1 && ! command -v npm >/dev/null 2>&1; then
echo "Need bun or npm to build EditorSource" >&2
exit 1
fi
if command -v bun >/dev/null 2>&1; then
bun install
bun run build
else
npm install
npm run build
fi
# Ensure index.html exists at EditorBundle root for iOS resource load.
if [[ ! -f "$OUT/index.html" ]]; then
echo "Editor bundle build did not produce index.html" >&2
exit 1
fi
# XcodeGen only packages paths under EdgeEver/Resources reliably — mirror there.
RES_OUT="$ROOT/EdgeEver/Resources/EditorBundle"
mkdir -p "$RES_OUT"
cp -f "$OUT/index.html" "$RES_OUT/index.html"
echo "Built EditorBundle → $OUT (mirrored to $RES_OUT)"