# https://taskfile.dev version: '3' vars: # Change this to switch package managers: bun, npm, pnpm, yarn PKG_MANAGER: npm tasks: setup: summary: Setup the project (including D2 diagram tool) preconditions: - sh: '{{.PKG_MANAGER}} --version' msg: "Looks like {{.PKG_MANAGER}} isn't installed." - sh: 'go version' msg: "Go is not installed. Install from https://go.dev/dl/" cmds: - '{{.PKG_MANAGER}} install' - go install oss.terrastruct.com/d2@latest - echo "✓ Setup complete. D2 installed to $(go env GOPATH)/bin/d2" dev: summary: Run the dev server deps: [setup] cmds: - '{{.PKG_MANAGER}} run dev' build: summary: Build the docs preconditions: - sh: '{{.PKG_MANAGER}} --version' msg: "Looks like {{.PKG_MANAGER}} isn't installed." cmds: - '{{.PKG_MANAGER}} run build'