b54a3139c7
Includes QWB, Qortal Web, and Q-Shops Q-Apps with shared packages and build scripts. Co-authored-by: Cursor <cursoragent@cursor.com>
34 lines
984 B
Bash
34 lines
984 B
Bash
#!/usr/bin/env bash
|
|
# Build the SPA and create ONE flat zip for Qortal Hub / dev / WEBSITE
|
|
# (archive root: index.html, assets/, zip-store.js, manifest, favicon — open or load in Hub dev mode).
|
|
set -euo pipefail
|
|
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
cd "$ROOT"
|
|
npm install
|
|
npm run build
|
|
|
|
if [[ ! -f dist/index.html ]]; then
|
|
echo "error: dist/index.html missing after build" >&2
|
|
exit 1
|
|
fi
|
|
for f in dist/manifest.json dist/zip-store.js; do
|
|
if [[ ! -f "$f" ]]; then
|
|
echo "warning: $f not found (ensure public/ contains it)" >&2
|
|
fi
|
|
done
|
|
|
|
DATE="$(date +%Y%m%d)"
|
|
OUT="Qortal-Hub-Dev-Test-${DATE}.zip"
|
|
|
|
# Mirror of deployable files (optional local inspection)
|
|
rm -rf extracted
|
|
mkdir -p extracted
|
|
cp -a dist/. extracted/
|
|
|
|
# Single zip: all site files with index.html at the root of the archive
|
|
( cd dist && zip -r -9 "$ROOT/$OUT" . )
|
|
cd "$ROOT"
|
|
echo "Hub / dev test zip (flat dist — load in Qortal Hub dev or WEBSITE):"
|
|
ls -la "$OUT"
|
|
echo "Mirror folder: $ROOT/extracted/"
|