diff --git a/.air.toml b/.air.toml index bbd4b15..33acb09 100644 --- a/.air.toml +++ b/.air.toml @@ -6,16 +6,11 @@ root = "." tmp_dir = "tmp" [build] -# Just plain old shell command. You could use `make` as well. -cmd = "ENV=dev go build -o ./tmp/rimgo ./main.go" -# Binary file yields from `cmd`. -bin = "./tmp/rimgo" -# Customize binary. -full_bin = "./tmp/rimgo" +full_bin = "ENV=dev go run main.go" # Watch these filename extensions. -include_ext = ["go", "tpl", "tmpl", "html", "mustache", "hbs", "pug", "css"] +include_ext = ["go", "hbs"] # Ignore these filename extensions or directories. -exclude_dir = ["tmp", "vendor", "node_modules"] +exclude_dir = ["tmp", "vendor", "static"] # Watch these directories if you specified. include_dir = [] # Exclude files. diff --git a/Justfile b/Justfile new file mode 100644 index 0000000..effff33 --- /dev/null +++ b/Justfile @@ -0,0 +1,7 @@ +build: + tailwindcss -i static/tailwind.css -o static/app.css -m + CGO_ENABLED=0 go build -o rimgo -ldflags "-X codeberg.org/rimgo/rimgo/pages.VersionInfo=$(date '+%Y-%m-%d')-$(git rev-list --abbrev-commit -1 HEAD)" + +dev: + tailwindcss -i static/tailwind.css -o static/app.css -m -w & + go run github.com/cosmtrek/air@latest -c .air.toml \ No newline at end of file