2022-08-25 14:51:07 +00:00
|
|
|
# https://taskfile.dev
|
|
|
|
|
|
|
|
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-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
|