From 7ab96371c40a464bd1ace892344a168b0b63bc99 Mon Sep 17 00:00:00 2001 From: Preston Baxter Date: Sun, 5 Nov 2023 11:02:39 -0600 Subject: [PATCH] B: update makefile --- Makefile | 3 +++ ui/.air.toml | 4 ++-- ui/Makefile | 8 ++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 5d0bfb7..bcc1af9 100644 --- a/Makefile +++ b/Makefile @@ -2,3 +2,6 @@ deploy: cd service; make deploy cd ui; make deploy cd infra; make deploy + +image: + codevis -i ./ --whitelist-extension go,hcl,tf,css,js,templ, diff --git a/ui/.air.toml b/ui/.air.toml index f3f8ffe..ead91df 100644 --- a/ui/.air.toml +++ b/ui/.air.toml @@ -5,7 +5,7 @@ tmp_dir = "tmp" [build] args_bin = [] bin = "./tmp/main" - cmd = "rm **/*_templ.go; templ generate --path ./templates && GOEXPERIMENT=loopvar go build -o ./tmp/main ." + cmd = "make local-build" delay = 1000 exclude_dir = ["assets", "tmp", "vendor", "testdata", "dist", "docker"] exclude_file = [] @@ -14,7 +14,7 @@ tmp_dir = "tmp" follow_symlink = false full_bin = "" include_dir = [] - include_ext = ["go", "tpl", "tmpl", "html", "templ"] + include_ext = ["go", "tpl", "tmpl", "html", "templ", "css"] include_file = [] kill_delay = "0s" log = "build-errors.log" diff --git a/ui/Makefile b/ui/Makefile index 6386045..78fec0e 100644 --- a/ui/Makefile +++ b/ui/Makefile @@ -1,5 +1,13 @@ BASE_URL="us-central1-docker.pkg.dev/pbaxter-infra/capstone-repo" +local-build: + rm **/*_templ.go + templ generate --path ./templates + npx tailwindcss -i static/index.css -o dist/output.css + GOEXPERIMENT=loopvar go build -o ./tmp/main . + +local-run: local-build + ./tmp/main build: docker build . -t frontend-service:latest