# https://taskfile.dev version: '3' vars: PARENT_BRANCH: main tasks: build: tsc checks: deps: [lint, test, build] integrate: deps: [checks] cmds: - git is-clean # did we had tests? - git diff-ls {{.PARENT_BRANCH}} | grep test - git checkout {{.PARENT_BRANCH}} - git weld - test: vitest run src test:dev: vitest src lint:fix:delta: vars: FILES: sh: git diff-ls --diff-filter=d main | grep -v .vitebook deps: - task: 'lint:fix' vars: CLI_ARGS: '{{.FILES | catLines }}' lint: cmds: - npx prettier --check {{.CLI_ARGS | default "." }} - npx eslint {{.CLI_ARGS | default "." }} lint:fix: cmds: - npx prettier --write {{.CLI_ARGS | default "." }} - npx eslint --fix --quiet {{.CLI_ARGS | default "." }} lint:delta: cmds: - task: 'lint:prettier:delta' - task: 'lint:eslint:delta' lint:prettier:delta: vars: FILES: sh: git diff-ls --diff-filter=d {{.ROOT_BRANCH | default "main"}} | grep -v .vitebook cmds: - npx prettier --check {{.FILES | catLines }} lint:eslint:delta: vars: FILES: sh: git diff-ls --diff-filter=d {{.ROOT_BRANCH | default "main"}} | grep -v .vitebook cmds: - npx eslint --format=unix {{.FILES | catLines }} lint:eslint: cmds: - npx eslint {{.FILES | default "src/**" }}