diff --git a/Taskfile.yml b/Taskfile.yml index b61c7d4a4..49e1b9afc 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -35,13 +35,15 @@ tasks: - rm sena-3.zip # docker - up: # e.g. task up -- otel-collector --build + up: + desc: 'E.g.: task up -- otel-collector --build' cmds: - docker compose up --wait {{.CLI_ARGS}} down: cmds: - docker compose down - restart: # e.g. task restart -- lexbox-api + restart: + desc: E.g. task restart -- lexbox-api cmds: - docker compose restart {{.CLI_ARGS}} @@ -69,7 +71,8 @@ tasks: - dotnet test --filter Category=Integration # dev - infra-up: # infrastructure for our ui and api + infra-up: + desc: Starts infrastructure for our ui and api vars: WAIT: '{{default true .WAIT}}' cmds: @@ -90,17 +93,16 @@ tasks: interactive: true # ui - ui-dev: # The single command for ui development - aliases: - - ui + ui-dev: + aliases: [ ui ] + desc: The single command for local ui development dir: ./frontend deps: [ backend-up, ui-down ] interactive: true cmds: - task: ui-only ui-only: - aliases: - - uio + aliases: [ uio ] dir: ./frontend deps: [ ui-install ] interactive: true @@ -123,9 +125,9 @@ tasks: cmds: - pnpm dlx playwright codegen staging.languagedepot.org # api - api-dev: # The single command for api development - aliases: - - api + api-dev: + aliases: [ api ] + desc: The single command for local api development dir: ./backend/LexBoxApi deps: [ infra-up, api-stop ] interactive: true @@ -145,13 +147,40 @@ tasks: cmds: - dotnet run migrate --environment "Development" - # usage: task add-migration -- "migration name" add-migration: + desc: 'usage: task add-migration -- "migration name". Often followed by `task database-update`.\n' dir: ./backend/LexBoxApi cmds: - dotnet ef migrations add --project ../LexData/LexData.csproj --startup-project LexBoxApi.csproj --context LexData.LexBoxDbContext --output-dir Migrations {{.CLI_ARGS}} -# this will remove the last migration, don't remove migrations that have been pushed to production, but you can remove ones you created locally. + remove-last-migration: + desc: "This will remove the last migration, don't remove migrations that have been pushed to production, but you can remove ones you created locally.\n" dir: ./backend/LexBoxApi cmds: - dotnet ef migrations remove --project ../LexData/LexData.csproj --startup-project LexBoxApi.csproj --context LexData.LexBoxDbContext + + db-update: + desc: "Runs any migrations that haven't yet been applied.\n" + dir: ./backend/LexBoxApi + cmds: + - dotnet ef database update --project ../LexData/LexData.csproj --startup-project LexBoxApi.csproj --context LexData.LexBoxDbContext + + svelte-check: + desc: "Runs the frontend code checks done in CI. Note: the app must be built.\n" + aliases: [ sc ] + dir: ./frontend + cmds: + - pnpm run check + - pnpm run lint + + svelte: + desc: "Directory independent access to pnpm. E.g. `task svelte -- install`\n" + aliases: [ s ] + dir: ./frontend + cmd: pnpm {{.CLI_ARGS}} + + dotnet: + desc: "Directory independent access to api dotnet. E.g. `task dotnet -- restore`\n" + aliases: [ dn ] + dir: ./backend/LexBoxApi + cmd: dotnet {{.CLI_ARGS}}