32 lines
754 B
YAML
32 lines
754 B
YAML
# https://taskfile.dev
|
|
|
|
version: "3"
|
|
|
|
tasks:
|
|
schemas: fd -e yml -p ./schemas-yaml -x task schema SCHEMA='{}'
|
|
|
|
schema:
|
|
vars:
|
|
DEST:
|
|
sh: echo {{.SCHEMA}} | perl -pe's/ya?ml/json/g'
|
|
sources: ["{{.SCHEMA}}"]
|
|
generates: ["{{.DEST}}"]
|
|
cmds:
|
|
- transerialize {{.SCHEMA}} {{.DEST}}
|
|
|
|
validate:
|
|
silent: true
|
|
cmds:
|
|
- |
|
|
ajv validate \
|
|
--all-errors \
|
|
--errors=json \
|
|
--verbose \
|
|
-c ajv-keywords \
|
|
-s schemas-yaml/character.yml \
|
|
-d {{.CLI_ARGS}}
|
|
test:
|
|
deps: [ schemas ]
|
|
cmds:
|
|
- vitest run
|