Files
sonr/Taskfile.yml
T

87 lines
2.8 KiB
YAML
Raw Normal View History

version: "3"
vars:
ROOT_DIR:
sh: git rev-parse --show-toplevel
tasks:
clean:
internal: true
cmds:
- rm -rf .task
- rm -rf pkg/design/node_modules
- rm -rf .out
# ╭──────────────────────────────────────────────────╮
# │ Generate Commands │
# ╰──────────────────────────────────────────────────╯
gen:tailwind:
cmds:
- cd ./pkg/webapp && bun run build
- cp ./pkg/webapp/components/styles/styles.css ./cmd/hway/styles.css
gen:pkl:
sources:
- pkl/base.types/Ctx.pkl
- pkl/base.types/DWN.pkl
- pkl/base.types/ORM.pkl
cmds:
- for: sources
cmd: go run github.com/apple/pkl-go/cmd/pkl-gen-go {{ .ITEM }}
- task: clean
gen:templ:
cmds:
- templ generate
# ╭──────────────────────────────────────────────────╮
# │ Build Commands │
# ╰──────────────────────────────────────────────────╯
build:motr:
env:
GOOS: js
GOARCH: wasm
cmds:
- go build -o build/app.wasm ./cmd/motr/main.go
build:hway:
cmds:
- task: gen:tailwind
- task: gen:templ
- go build -o build/hway ./cmd/hway/main.go
# ╭──────────────────────────────────────────────────╮
# │ Serve Commands │
# ╰──────────────────────────────────────────────────╯
serve:hway:
cmds:
- task: build:hway
- ./build/hway
# ╭──────────────────────────────────────────────────╮
# │ Deploy Commands │
# ╰──────────────────────────────────────────────────╯
deploy:buf:
dir: proto
cmds:
- bunx buf dep update
- bunx buf build
- bunx buf push
deploy:hway:
dir: cmd/hway
cmds:
- task: gen:design
- bunx wrangler deploy
deploy:pkl:
cmds:
- bunx pkl project package pkl/*/
- |
for dir in .out/*/; do
folder=$(basename "$dir")
rclone copy "$dir" "r2:pkljar/$folder"
done
- task: clean