homebox/Taskfile.yml
Hayden 95ab14b866
feat: items-editor (#5)
* format readme

* update logo

* format html

* add logo to docs

* repository for document and document tokens

* add attachments type and repository

* autogenerate types via scripts

* use autogenerated types

* attachment type updates

* add insured and quantity fields for items

* implement HasID interface for entities

* implement label updates for items

* implement service update method

* WIP item update client side actions

* check err on attachment

* finish types for basic items editor

* remove unused var

* house keeping
2022-09-12 14:47:27 -08:00

61 lines
1.4 KiB
YAML

version: "3"
tasks:
generate:
cmds:
- |
cd backend && ent generate ./ent/schema \
--template=ent/schema/templates/has_id.tmpl
- cd backend/app/api/ && swag fmt
- cd backend/app/api/ && swag init --dir=./,../../internal,../../pkgs
- |
npx swagger-typescript-api \
--no-client \
--clean-output \
--modular \
--path ./backend/app/api/docs/swagger.json \
--output ./frontend/lib/api/types
python3 ./scripts/process-types.py ./frontend/lib/api/types/data-contracts.ts
api:
cmds:
- task: generate
- cd backend && go run ./app/api/ {{.CLI_ARGS}}
silent: false
api:build:
cmds:
- cd backend && go build ./app/api/
silent: true
api:test:
cmds:
- cd backend && go test ./app/api/
silent: true
api:watch:
cmds:
- cd backend && gotestsum --watch ./...
api:coverage:
cmds:
- cd backend && go test -race -coverprofile=coverage.out -covermode=atomic ./app/... ./internal/... ./pkgs/... -v -cover
silent: true
test:ci:
cmds:
- cd backend && go build ./app/api
- backend/api &
- sleep 5
- cd frontend && pnpm run test:ci
silent: true
frontend:watch:
desc: Starts the vitest test runner in watch mode
cmds:
- cd frontend && pnpm vitest --watch
frontend:
desc: Run frontend development server
cmds:
- cd frontend && pnpm dev