diff --git a/.zed/tasks.json b/.zed/tasks.json new file mode 100644 index 0000000..ce5cee7 --- /dev/null +++ b/.zed/tasks.json @@ -0,0 +1,10 @@ +[ + { + "label": "Set up worktree", + "command": "./scripts/setup-worktree.sh", + "cwd": "$ZED_WORKTREE_ROOT", + "hooks": ["create_worktree"], + "reveal": "no_focus", + "hide": "on_success" + } +] diff --git a/scripts/setup-worktree.sh b/scripts/setup-worktree.sh new file mode 100755 index 0000000..900415e --- /dev/null +++ b/scripts/setup-worktree.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +set -eu + +if ! command -v pnpm >/dev/null 2>&1; then + printf '%s\n' 'error: pnpm is required to set up this worktree' >&2 + exit 1 +fi + +printf '%s\n' 'Installing dependencies from the frozen lockfile...' +pnpm install --frozen-lockfile + +printf '%s\n' 'Building the workspace...' +pnpm build