gostart/Makefile

28 lines
717 B
Makefile
Raw Normal View History

2023-09-20 15:12:19 -06:00
GOSRC!=find * -type f \( -name '*.go' -and -not -name '*_test.go' \)
GOSRC+=go.mod go.sum
2022-12-21 19:28:49 -07:00
gostart: $(GO_SRC) go.mod go.sum data assets/main.min.js
2023-09-20 15:12:19 -06:00
go build -trimpath -o $@
2023-05-18 12:54:16 -06:00
2023-09-20 15:12:19 -06:00
assets/main.min.js: src/Main.elm
elm make $< --optimize --output=assets/main.js
uglifyjs assets/main.js --compress 'pure_funcs=[F2,F3,F4,F5,F6,F7,F8,F9,A2,A3,A4,A5,A6,A7,A8,A9],pure_getters,keep_fargs=false,unsafe_comps,unsafe' | uglifyjs --mangle --output $@
2023-06-12 08:02:09 -06:00
rm -f assets/main.js
2022-12-21 19:28:49 -07:00
2023-09-20 15:12:19 -06:00
data: queries.sql schema.sql
2022-12-21 19:28:49 -07:00
sqlc generate
2023-09-20 15:12:19 -06:00
touch data
2022-12-21 19:28:49 -07:00
2023-09-20 15:12:19 -06:00
.PHONY: check
check:
go vet ./...
staticcheck ./...
2022-12-21 19:28:49 -07:00
2023-09-20 15:12:19 -06:00
.PHONY: watch
2023-05-18 13:10:25 -06:00
watch:
2023-09-20 16:33:21 -06:00
echo src/Main.elm | entr -r make assets/main.min.js
2023-05-18 13:10:25 -06:00
2023-09-20 15:12:19 -06:00
.PHONY: run
run: gostart
2023-07-25 07:20:53 -06:00
./gostart -name startdev -db ./test.db -dev