mirror of
https://github.com/hay-kot/homebox.git
synced 2025-08-05 17:10:30 +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:
|
tasks:
|
||||||
generate:
|
generate:
|
||||||
|
desc: |
|
||||||
|
Generates collateral files from the backend project
|
||||||
|
including swagger docs and typescripts type for the frontend
|
||||||
cmds:
|
cmds:
|
||||||
- |
|
- |
|
||||||
cd backend && ent generate ./ent/schema \
|
cd backend && ent generate ./ent/schema \
|
||||||
|
@ -17,10 +20,21 @@ tasks:
|
||||||
--output ./frontend/lib/api/types
|
--output ./frontend/lib/api/types
|
||||||
|
|
||||||
python3 ./scripts/process-types.py ./frontend/lib/api/types/data-contracts.ts
|
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:
|
api:
|
||||||
|
desc: Starts the backend api server (depends on generate task)
|
||||||
|
deps:
|
||||||
|
- generate
|
||||||
cmds:
|
cmds:
|
||||||
- task: generate
|
- cd backend && go run ./app/api/ {{ .CLI_ARGS }}
|
||||||
- cd backend && go run ./app/api/ {{.CLI_ARGS}} ./config.yml
|
|
||||||
silent: false
|
silent: false
|
||||||
|
|
||||||
api:build:
|
api:build:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue