19 lines
1.2 KiB
JSON
19 lines
1.2 KiB
JSON
{
|
|
"$schema": "https://t3.codes/schema/t3.json",
|
|
"scripts": [
|
|
{
|
|
"name": "Bootstrap worktree (portable)",
|
|
"icon": "configure",
|
|
"command": "set -e\nworktree=\"${T3CODE_WORKTREE_PATH:-$PWD}\"\nroot=\"${T3CODE_PROJECT_ROOT:-}\"\nif [ -z \"$root\" ] || [ ! -d \"$root\" ]; then\n root=$(git -C \"$worktree\" worktree list --porcelain | sed -n '1{s/^worktree //;p;}')\nfi\nif [ -z \"$root\" ] || [ ! -d \"$root\" ]; then\n printf '%s\\n' 'Could not find the source checkout for worktree bootstrap.' >&2\n exit 1\nfi\ncd \"$worktree\"\nfor relative in .env packages/backend/.env.local packages/backend/.env.staging; do\n source_path=\"$root/$relative\"\n target_path=\"$worktree/$relative\"\n if [ -f \"$source_path\" ]; then\n mkdir -p \"$(dirname \"$target_path\")\"\n command cp -f \"$source_path\" \"$target_path\"\n fi\ndone\nprintf '%s\\n' 'Copied project environment files.'\ncommand pnpm install --frozen-lockfile",
|
|
"runOnWorktreeCreate": true
|
|
},
|
|
{
|
|
"name": "Start local stack (Herdr script)",
|
|
"icon": "play",
|
|
"command": "bash scripts/start-local-stack.sh",
|
|
"previewUrl": "http://localhost:5173",
|
|
"autoOpenPreview": true
|
|
}
|
|
]
|
|
}
|