hv-unified/scripts/build.sh
GaboGG d60233d205 v0.14.7 - Gear scraper: captures full equipment stats to localStorage
- New module: gear-scraper.js (10K, 200+ lines)
- Auto-scrapes Character page (?ss=ch) for equipped gear with full stat
  blocks: ADB, damage, crit, parry, evade, burden, mitigation, stats
- Auto-scrapes Armory inventory page for all items with IDs, names,
  categories, potency, durability
- Scrapes Modify detail page for one item's complete stat table
- Stores everything in localStorage['hvunified_geardb']
- ParseHV.advice() now includes gear info
- Public API: getGearDB() returns full gear database
2026-07-27 14:55:48 -04:00

66 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
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
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"