From bd4b86b91de4cf8539e4379896988916670005a0 Mon Sep 17 00:00:00 2001 From: Adrian Kahali Date: Wed, 13 May 2026 14:51:44 -0400 Subject: [PATCH 1/2] chore: add tilt --- .tiltignore | 5 ++ .vscode/extensions.json | 2 +- .vscode/settings.json | 5 +- Tiltfile | 124 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 134 insertions(+), 2 deletions(-) create mode 100644 .tiltignore create mode 100644 Tiltfile diff --git a/.tiltignore b/.tiltignore new file mode 100644 index 0000000..a6f4d66 --- /dev/null +++ b/.tiltignore @@ -0,0 +1,5 @@ +node_modules/ +dist/ +.astro/ +agent/node_modules/ +*.log diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 22a1505..4bbc7e0 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,4 +1,4 @@ { - "recommendations": ["astro-build.astro-vscode"], + "recommendations": ["astro-build.astro-vscode", "tilt-dev.tiltfile"], "unwantedRecommendations": [] } diff --git a/.vscode/settings.json b/.vscode/settings.json index d56e0a2..8b3d72c 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,5 +4,8 @@ "fileMatch": ["**/src/content/docs/**/_category.json"], "url": "./src/schemas/category.schema.json" } - ] + ], + "files.associations": { + "Tiltfile": "tiltfile" + } } diff --git a/Tiltfile b/Tiltfile new file mode 100644 index 0000000..8291067 --- /dev/null +++ b/Tiltfile @@ -0,0 +1,124 @@ +# Docs-v2 Development Environment + +# --- Guard: vale required for writing check --- +_vale_installed = str(local("which vale 2>/dev/null || echo ''", quiet=True)).strip() != "" + +local_resource( + "install", + cmd="bun install", + dir=".", + labels=["setup"], +) + +local_resource( + "dev", + serve_cmd="bun dev", + serve_dir=".", + resource_deps=["install"], + links=["http://localhost:4321"], + labels=["services"], +) + +local_resource( + "preview", + cmd="bun run build", + serve_cmd="bun preview", + serve_dir=".", + resource_deps=["install"], + auto_init=False, + links=["http://localhost:4321"], + labels=["services"], +) + +local_resource( + "build", + cmd="bun run build", + dir=".", + resource_deps=["install"], + auto_init=False, + labels=["build"], +) + +local_resource( + "check", + cmd="bun run check", + dir=".", + resource_deps=["install"], + auto_init=False, + labels=["checks"], +) + +local_resource( + "check:format", + cmd="bun run check:format", + dir=".", + resource_deps=["install"], + auto_init=False, + labels=["checks"], +) + +local_resource( + "check:lint", + cmd="bun run check:lint", + dir=".", + resource_deps=["install"], + auto_init=False, + labels=["checks"], +) + +local_resource( + "check:type", + cmd="bun run check:type", + dir=".", + resource_deps=["install"], + auto_init=False, + labels=["checks"], +) + +local_resource( + "check:links", + cmd="bun run check:link", + dir=".", + resource_deps=["install"], + auto_init=False, + labels=["checks"], +) + +if _vale_installed: + local_resource( + "check:writing", + cmd="bun run check:writing", + dir=".", + resource_deps=["install"], + auto_init=False, + labels=["checks"], + ) +else: + warn("vale not found in PATH. 'check:writing' resource disabled. Install with: brew install vale") + +local_resource( + "fix", + cmd="bun run fix", + dir=".", + resource_deps=["install"], + auto_init=False, + labels=["utils"], +) + +local_resource( + "fix:format", + cmd="bun run fix:format", + dir=".", + resource_deps=["install"], + auto_init=False, + labels=["utils"], +) + +local_resource( + "fix:lint", + cmd="bun run fix:lint", + dir=".", + resource_deps=["install"], + auto_init=False, + labels=["utils"], +) From e4866c4c07fcc301d31450fe30b0a61e8a3851da Mon Sep 17 00:00:00 2001 From: Adrian Kahali Date: Wed, 13 May 2026 15:06:05 -0400 Subject: [PATCH 2/2] address greptile --- Tiltfile | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Tiltfile b/Tiltfile index 8291067..0d256b5 100644 --- a/Tiltfile +++ b/Tiltfile @@ -26,7 +26,7 @@ local_resource( serve_dir=".", resource_deps=["install"], auto_init=False, - links=["http://localhost:4321"], + links=["http://localhost:4322"], labels=["services"], ) @@ -94,7 +94,7 @@ if _vale_installed: labels=["checks"], ) else: - warn("vale not found in PATH. 'check:writing' resource disabled. Install with: brew install vale") + warn("vale not found in PATH. 'check:writing' resource disabled. See https://vale.sh/docs/vale-cli/installation/ for install instructions.") local_resource( "fix", diff --git a/package.json b/package.json index be2c90d..4599ec7 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "scripts": { "dev": "bunx --bun astro dev", "build": "bunx --bun astro build && npx pagefind --site dist", - "preview": "bunx --bun astro preview", + "preview": "bunx --bun astro preview --port 4322", "astro": "bunx --bun astro", "check": "bun run --parallel check:format check:lint check:type check:writing check:link", "check:format": "bun run --parallel check:format:oxfmt check:format:biome",