# Live reload for archied during dashboard work. # # The frontend has its own loop -- `task ui:dev` runs Vite with HMR and proxies # /api and /events here -- so this watcher deliberately ignores ui/. Watching # it would rebuild the Go binary on every keystroke in a CSS file, and # rebuilding on ui/dist changes would loop against `task ui`. # # ui/dist is NOT rebuilt here. During development the Vite server serves the # frontend directly with HMR, so dist is not what you are looking at; it only # matters for the embedded build, and `task ui` produces it before a commit. # An earlier rule here claimed to keep dist current and never ran: air # requires a file to satisfy include_dir AND include_file together, and ui/ is # excluded from the walk anyway. root = "." tmp_dir = ".air" [build] cmd = "go build -o ./.air/archied ./cmd/archied" # `bin` is deprecated in air; entrypoint is the current key. entrypoint = "./.air/archied" include_ext = ["go", "toml"] exclude_dir = ["ui", "bin", "docs", ".git", ".task", ".air", "tmp"] exclude_regex = ["_test\\.go"] stop_on_error = true delay = 400 [log] time = true # Only air's own build/restart lines. Without this it prints a "watching X" # line per directory on every start, which buries Vite's output when both # run in one terminal under `task dev`. main_only = true [misc] clean_on_exit = true