Skip to content

Commit

Permalink
chore: uses air instead of reflex (#3465)
Browse files Browse the repository at this point in the history
  • Loading branch information
amir20 authored Dec 17, 2024
1 parent 23ba1f6 commit 86522cc
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 7 deletions.
57 changes: 57 additions & 0 deletions .air.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
root = "."
testdata_dir = "testdata"
tmp_dir = "tmp"

[build]
args_bin = []
bin = "./tmp/dozzle"
cmd = "go build -race -o ./tmp/dozzle ."
delay = 1000
exclude_dir = [
"assets",
"tmp",
"data",
"node_modules",
"docs",
"test-results",
"dist",
"e2e",
"examples",
]
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 = "2s"
log = "build-errors.log"
poll = false
poll_interval = 0
post_cmd = []
pre_cmd = []
rerun = false
rerun_delay = 500
send_interrupt = true
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

[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
Expand Up @@ -14,3 +14,4 @@ coverage.out
/playwright/.cache/
*.pem
*.csr
tmp
1 change: 0 additions & 1 deletion .reflex.agent

This file was deleted.

1 change: 0 additions & 1 deletion .reflex.server

This file was deleted.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ push: docker
tools:
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
go install github.com/cespare/reflex@latest
go install github.com/air-verse/air@latest

run: docker
docker run -it --rm -p 8080:8080 -v /var/run/docker.sock:/var/run/docker.sock amir20/dozzle:latest
Expand Down
2 changes: 1 addition & 1 deletion internal/support/cli/args.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ type HealthcheckCmd struct {
}

type AgentCmd struct {
Addr string `arg:"env:DOZZLE_AGENT_ADDR" default:":7007" help:"sets the host:port to bind for the agent"`
Addr string `arg:"--agent-addr,env:DOZZLE_AGENT_ADDR" default:":7007" help:"sets the host:port to bind for the agent"`
}

type AgentTestCmd struct {
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
"license": "ISC",
"author": "Amir Raminfar <[email protected]>",
"scripts": {
"agent:dev": "DOZZLE_AGENT_ADDR=localhost:7007 DEV=true reflex -c .reflex.agent",
"agent:dev": "DEV=true air -- agent --level debug --agent-addr localhost:7007",
"watch:frontend": "vite --open http://localhost:3100/",
"watch:backend": "LIVE_FS=true DEV=true DOZZLE_ADDR=localhost:3100 reflex -c .reflex.server",
"watch:backend": "LIVE_FS=true DEV=true air -- --level debug --addr localhost:3100",
"dev": "concurrently --kill-others \"npm:watch:*\"",
"build": "vite build",
"preview": "LIVE_FS=true DOZZLE_ADDR=localhost:3100 reflex -c .reflex.server",
"preview": "LIVE_FS=true air -- --addr localhost:3100",
"release": "bumpp",
"test": "TZ=UTC vitest",
"typecheck": "vue-tsc --noEmit",
Expand Down

0 comments on commit 86522cc

Please sign in to comment.