Skip to content

Commit

Permalink
Added air for live reload
Browse files Browse the repository at this point in the history
  • Loading branch information
joeychilson committed Dec 21, 2023
1 parent a4b5fc5 commit 56f0f8a
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 2 deletions.
46 changes: 46 additions & 0 deletions .air.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
root = "."
testdata_dir = "testdata"
tmp_dir = "tmp"

[build]
args_bin = []
bin = "./tmp/main"
cmd = "make build"
delay = 1000
exclude_dir = ["assets", "tmp", "vendor", "testdata"]
exclude_file = []
exclude_regex = ["_test.go", "_templ.go"]
exclude_unchanged = false
follow_symlink = false
full_bin = ""
include_dir = []
include_ext = ["go", "tpl", "tmpl", "html", "templ"]
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
time = false

[misc]
clean_on_exit = false

[screen]
clear_on_rebuild = false
keep_scroll = true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/tmp
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@ templ:
css:
tailwindcss -i ./assets/tailwind.css -o ./assets/app.css

app:
go run main.go
run:
go run main.go

build:
templ generate && tailwindcss -i ./assets/tailwind.css -o ./assets/app.css && go build -o ./tmp/main .

0 comments on commit 56f0f8a

Please sign in to comment.