updux/Taskfile.yaml

115 lines
2.8 KiB
YAML
Raw Permalink Normal View History

2022-08-25 14:51:07 +00:00
# https://taskfile.dev
2024-08-08 15:58:52 +00:00
# tea releases c --asset releases/updux-4.0.0-alpha.2.tgz -p --title v4.0.0-alpha.2 --tag v4.0.0-alpha.2
2022-08-25 14:51:07 +00:00
version: '3'
2023-04-21 18:01:12 +00:00
vars:
PARENT_BRANCH: main
2022-08-25 14:51:07 +00:00
tasks:
2024-08-10 13:28:07 +00:00
release:gitea:
cmds:
2024-08-13 16:46:11 +00:00
- tea releases create -asset releases/updux-{{.VERSION}}.tgz -p --title v{{.VERSION}} --tag v{{.VERSION}}
2024-08-10 13:28:07 +00:00
vars:
VERSION: { sh: 'npm version --json | jq -r .updux' }
2024-08-10 13:10:47 +00:00
prerelease:
desc: deploy a prerelease
deps:
- build
- checks
cmds:
- npm version prerelease
2024-08-12 14:09:16 +00:00
- git push --tags
2024-08-10 13:10:47 +00:00
- npm pack --pack-destination releases
2024-08-10 13:28:07 +00:00
- { task: 'release:gitea' }
2024-08-10 13:10:47 +00:00
2024-08-08 13:37:38 +00:00
pack:
2024-08-08 15:51:49 +00:00
desc: bundle the distro
deps: [build, checks]
2024-08-08 13:37:38 +00:00
cmds:
2024-08-08 13:40:28 +00:00
- npm pack --pack-destination releases
2024-08-08 13:37:38 +00:00
2024-08-08 15:51:49 +00:00
build:
sources:
- src/**/*.ts
generates:
- dist/**/*.js
cmds:
- tsc
2023-03-06 17:16:17 +00:00
checks:
2023-09-06 19:09:45 +00:00
deps: [test, build]
2023-04-21 18:01:12 +00:00
integrate:
deps: [checks]
cmds:
- git is-clean
# did we had tests?
- git diff-ls {{.PARENT_BRANCH}} | grep test
- git checkout {{.PARENT_BRANCH}}
- git weld -
2023-03-06 17:16:17 +00:00
2024-08-08 13:28:44 +00:00
test: vitest run src
2023-03-02 17:32:27 +00:00
test:dev: vitest src
2022-08-25 14:51:07 +00:00
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 "." }}
2022-08-30 15:00:00 +00:00
lint:delta:
cmds:
2022-08-30 18:16:29 +00:00
- task: 'lint:prettier:delta'
- task: 'lint:eslint:delta'
2022-08-30 15:00:00 +00:00
lint:prettier:delta:
vars:
FILES:
sh: git diff-ls --diff-filter=d {{.ROOT_BRANCH | default "main"}} | grep -v .vitebook
cmds:
2022-08-30 18:16:29 +00:00
- npx prettier --check {{.FILES | catLines }}
2022-08-30 15:00:00 +00:00
2022-08-25 14:51:07 +00:00
lint:eslint:delta:
vars:
FILES:
2022-08-30 15:00:00 +00:00
sh: git diff-ls --diff-filter=d {{.ROOT_BRANCH | default "main"}} | grep -v .vitebook
2022-08-25 14:51:07 +00:00
cmds:
- npx eslint --format=unix {{.FILES | catLines }}
lint:eslint:
cmds:
- npx eslint {{.FILES | default "src/**" }}
2023-08-30 14:55:53 +00:00
2024-08-08 13:28:44 +00:00
docs:api:
sources: [src/**.ts]
generates: [docs/src/content/docs/api/**.md]
cmds:
- typedoc
- contrib/api_grooming.pl docs/src/content/docs/api
2024-02-26 19:25:28 +00:00
docs:serve:
cmds:
- mkdocs serve
typedoc:
cmds:
- typedoc
2023-08-30 14:55:53 +00:00
docsify-install:
cmds:
- cp -r node_modules/docsify/lib docs/docsify