hv-unified/scripts/build.sh
GaboGG 5941b1d236 v0.17.0 - jpx round-chaining bridge
- New src/jpx-bridge.js: re-triggers jpx auto-battle (M key) after each
  round completes, chaining single-round auto-battler into continuous play
- Config: autoChainJpx (default on), chainMinHP 0.25, chainMaxRounds 0
- Safety: stops below chainMinHP, at maxRounds, or when jpx absent
- Settings panel: jpx Bridge section
- API: HV.chain(on), HV.chainState()
- Works by dispatching synthetic 'm' keydown (jpx reads e.key, not isTrusted)
- Never re-implements battle logic — jpx executes, we bridge rounds
2026-08-04 15:53:25 -04:00

68 lines
1.4 KiB
Bash
Executable file

#!/bin/bash
# Build HV Unified from src/* into a single hv-unified.user.js
# Usage: ./scripts/build.sh [--watch]
# No dependencies — pure cat concatenation.
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
PROJECT_DIR="$(dirname "$SCRIPT_DIR")"
SRC_DIR="$PROJECT_DIR/src"
OUTPUT="$PROJECT_DIR/scripts/hv-unified.user.js"
# Ordered list of source files
FILES=(
header.user.js
config.js
state.js
utils.js
page-detector.js
battle-parser.js
items.js
knowledge-base.js
strategy-engine.js
jpx-bridge.js
action-executor.js
hover-system.js
keybindings.js
ui-overlays.js
settings-panel.js
out-of-battle.js
guidance.js
progress-tracker.js
abilities.js
armory.js
gear-scraper.js
gear-analysis.js
battle-logger.js
re-timer.js
settings-page.js
public-api.js
init.js
)
echo "🛡️ Building HV Unified..."
echo " Source: $SRC_DIR"
echo " Output: $OUTPUT"
echo ""
# Clear output
> "$OUTPUT"
# Concatenate with clear separators
for file in "${FILES[@]}"; do
src_path="$SRC_DIR/$file"
if [ ! -f "$src_path" ]; then
echo " ⚠️ MISSING: $file (skipping)"
continue
fi
echo " ├── $file"
cat "$src_path" >> "$OUTPUT"
echo "" >> "$OUTPUT"
done
# Count lines
LINES=$(wc -l < "$OUTPUT")
SIZE=$(du -h "$OUTPUT" | cut -f1)
echo ""
echo " ✅ Built: $LINES lines, $SIZE"