Optimize taskfile to prevent rebuilding unchanged things

This commit is contained in:
Luis Eduardo Jeréz Girón
2024-09-06 00:17:02 -06:00
parent ae6555c6b2
commit f981261488

View File

@@ -20,11 +20,9 @@ tasks:
build:
desc: Build the project
deps:
- clean
- gen-db
- build-static
cmds:
- task fmt
- go build -o ./dist/app ./cmd/app/.
- go build -o ./dist/change-password ./cmd/changepw/.
@@ -55,7 +53,10 @@ tasks:
gen-db:
desc: Generate sqlc files
silent: true
cmd: sqlc generate
sources:
- ./internal/**/*.sql
reset-db:
desc: Reset the database
@@ -73,6 +74,9 @@ tasks:
- >
npm run esbuild -- ./internal/view/static/js/app.js
--bundle --minify --outfile=./internal/view/static/js/app.min.js
sources:
- ./internal/**/*.css
- ./internal/**/*.js
tidy:
desc: Tidy the go.mod file