mirror of
https://github.com/hay-kot/homebox.git
synced 2025-08-03 08:10:28 +00:00
add cache to code generators
This commit is contained in:
parent
d103151620
commit
3b893e2242
1 changed files with 16 additions and 2 deletions
18
Taskfile.yml
18
Taskfile.yml
|
@ -2,6 +2,9 @@ version: "3"
|
|||
|
||||
tasks:
|
||||
generate:
|
||||
desc: |
|
||||
Generates collateral files from the backend project
|
||||
including swagger docs and typescripts type for the frontend
|
||||
cmds:
|
||||
- |
|
||||
cd backend && ent generate ./ent/schema \
|
||||
|
@ -17,10 +20,21 @@ tasks:
|
|||
--output ./frontend/lib/api/types
|
||||
|
||||
python3 ./scripts/process-types.py ./frontend/lib/api/types/data-contracts.ts
|
||||
sources:
|
||||
- "./backend/app/api/**/*"
|
||||
- "./backend/app/internal/types/**/*"
|
||||
- "./scripts/process-types.py"
|
||||
generates:
|
||||
- "./frontend/lib/api/types/data-contracts.ts"
|
||||
- "./backend/app/api/docs/swagger.json"
|
||||
- "./backend/app/api/docs/swagger.yaml"
|
||||
|
||||
api:
|
||||
desc: Starts the backend api server (depends on generate task)
|
||||
deps:
|
||||
- generate
|
||||
cmds:
|
||||
- task: generate
|
||||
- cd backend && go run ./app/api/ {{.CLI_ARGS}} ./config.yml
|
||||
- cd backend && go run ./app/api/ {{ .CLI_ARGS }}
|
||||
silent: false
|
||||
|
||||
api:build:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue