From cb55a19adaf36b75ccdcfe19db92db92d1886d5a Mon Sep 17 00:00:00 2001 From: Gregory Ballantine Date: Thu, 2 Oct 2025 14:42:14 -0400 Subject: [PATCH] Switching from air to fresh for auto-reloading --- .air.toml | 52 ---------------------------------------------------- README.md | 8 ++++---- runner.conf | 14 ++++++++++++++ 3 files changed, 18 insertions(+), 56 deletions(-) delete mode 100644 .air.toml create mode 100644 runner.conf diff --git a/.air.toml b/.air.toml deleted file mode 100644 index 2f45997..0000000 --- a/.air.toml +++ /dev/null @@ -1,52 +0,0 @@ -root = "." -testdata_dir = "testdata" -tmp_dir = "tmp" - -[build] - args_bin = [] - bin = "./tmp/main" - cmd = "go build -o ./tmp/main ." - delay = 1000 - exclude_dir = ["assets", "tmp", "vendor", "testdata", "node_modules", "public", "data"] - exclude_file = [] - exclude_regex = ["_test.go"] - exclude_unchanged = false - follow_symlink = false - full_bin = "" - include_dir = [] - include_ext = ["go", "tpl", "tmpl", "html"] - include_file = [] - kill_delay = "0s" - log = "build-errors.log" - poll = false - poll_interval = 0 - post_cmd = [] - pre_cmd = [] - rerun = false - rerun_delay = 500 - send_interrupt = false - stop_on_error = false - -[color] - app = "" - build = "yellow" - main = "magenta" - runner = "green" - watcher = "cyan" - -[log] - main_only = false - silent = false - time = false - -[misc] - clean_on_exit = false - -[proxy] - app_port = 0 - enabled = false - proxy_port = 0 - -[screen] - clear_on_rebuild = false - keep_scroll = true diff --git a/README.md b/README.md index e1e1453..f40b9d6 100644 --- a/README.md +++ b/README.md @@ -33,19 +33,19 @@ RedHat and clones: `dnf install -y golang` ### Local/Native Development -BLT uses [air](https://github.com/air-verse/air) to auto-reload the app. While this is not strictly necessary, it used to make development more convenient. If you wish to forego installing it, you may simply build and run the app with the standard `go run main.go`. +BLT uses [fresh](https://github.com/gravityblast/fresh) to auto-reload the app. While this is not strictly necessary, it used to make development more convenient. If you wish to forego installing it, you may simply build and run the app with the standard `go run main.go`. 1. Install dependencies: `go mod download` -2. Install air to auto-reload the app: +2. Install fresh to auto-reload the app: -`go install github.com/cosmtrek/air@latest` +`go install github.com/gravityblast/fresh@latest` 3. Run the app via air: -`air` +`fresh` 4. If everything is running successfully you can open your browser and go to http://localhost:2830. diff --git a/runner.conf b/runner.conf new file mode 100644 index 0000000..1c95660 --- /dev/null +++ b/runner.conf @@ -0,0 +1,14 @@ +root: . +tmp_path: ./tmp +build_name: runner-build +build_log: runner-build-errors.log +valid_ext: .go, .tpl, .tmpl, .html +no_rebuild_ext: .tpl, .tmpl, .html +ignored: assets, tmp, node_modules, data, vendor +build_delay: 600 +colors: 1 +log_color_main: cyan +log_color_build: yellow +log_color_runner: green +log_color_watcher: magenta +log_color_app: