mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-02-17 16:07:40 +01:00
Adds .air.toml for air-verse/air hot-reload during development: - Watches Go files in cmd/, internal/, pkg/ - Excludes tests, vendor, node_modules, frontend - Automatically rebuilds on file changes - Supports Pro build detection via HOT_DEV_USE_PRO env var - Kill delay and graceful shutdown configured
48 lines
1.1 KiB
TOML
48 lines
1.1 KiB
TOML
# Air configuration for Pulse hot-reload
|
|
# https://github.com/air-verse/air
|
|
|
|
root = "."
|
|
tmp_dir = "tmp"
|
|
|
|
[build]
|
|
# Build command - uses Pro build if available
|
|
cmd = """
|
|
if [ -d /opt/pulse-enterprise ] && [ "${HOT_DEV_USE_PRO:-true}" = "true" ]; then
|
|
cd /opt/pulse-enterprise && go build -buildvcs=false -o /opt/pulse/pulse ./cmd/pulse-enterprise
|
|
else
|
|
go build -o pulse ./cmd/pulse
|
|
fi
|
|
"""
|
|
# Binary to run
|
|
bin = "./pulse"
|
|
# Watch these directories
|
|
include_dir = ["cmd", "internal", "pkg"]
|
|
# Exclude these patterns
|
|
exclude_dir = ["vendor", "node_modules", "tmp", "frontend-modern", ".git"]
|
|
exclude_file = []
|
|
exclude_regex = ["_test\\.go$", "\\.tmp$", "~$"]
|
|
exclude_unchanged = true
|
|
# File extensions to watch
|
|
include_ext = ["go", "tpl", "tmpl", "html"]
|
|
# Kill old process before starting new one
|
|
kill_delay = "1s"
|
|
# Send interrupt signal first, then kill after delay
|
|
stop_on_error = false
|
|
# Log output
|
|
log = "build-errors.log"
|
|
# Colorize output
|
|
color_main = "yellow"
|
|
color_watcher = "cyan"
|
|
color_build = "green"
|
|
color_runner = "magenta"
|
|
|
|
[log]
|
|
# Show log time
|
|
time = false
|
|
# Only show main logs
|
|
main_only = false
|
|
|
|
[misc]
|
|
# Delete tmp directory on exit
|
|
clean_on_exit = true
|