@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 06:00 UTC

main
ts 52 lines 1.62 KB
Raw
1 import * as Namespace from "alchemy/Namespace";
2 import { makeFrameworkSite, type FrameworkSiteProps } from "./FrameworkSite.ts";
3
4 /** The framework-integration package that drives the Vocs build. */
5 export const VOCS_FRAMEWORK_SPECIFIER = "@alchemy.run/frontend-frameworks/vocs/node";
6
7 /** The Node container deploy target for the Vocs build. */
8 export const VOCS_NODE_TARGET_SPECIFIER = "@alchemy.run/frontend-frameworks/vocs/node";
9
10 export interface VocsProps extends FrameworkSiteProps {
11 /**
12 * Vocs build output directory, relative to {@link rootDir}. Set this when
13 * `vocs.config.*` customizes `outDir` so generated output stays outside the
14 * rebuild hash.
15 * @default "dist"
16 */
17 outDir?: string;
18 }
19
20 /**
21 * Deploy a [Vocs](https://vocs.dev) documentation project to a Hetzner
22 * Cloud Server. Static assets first, then Vocs' Waku RSC handler
23 * (`/about` → `about/index.html`, otherwise SSR).
24 *
25 *
26 * ### Creating Vocs Sites
27 * **Example:** Vocs Documentation Site
28 * ```typescript
29 * const docs = yield* Hetzner.Website.Vocs("Docs", {
30 * rootDir: "./docs",
31 * });
32 * ```
33 *
34 * **Example:** Custom Output Directory
35 * ```typescript
36 * const docs = yield* Hetzner.Website.Vocs("Docs", {
37 * rootDir: "./docs",
38 * outDir: "build",
39 * });
40 * ```
41 *
42 * @resource
43 * @product Website
44 */
45 export const Vocs = (id: string, props: VocsProps = {}) =>
46 makeFrameworkSite(id, props, {
47 name: "Vocs",
48 framework: VOCS_FRAMEWORK_SPECIFIER,
49 target: VOCS_NODE_TARGET_SPECIFIER,
50 options: props.outDir !== undefined ? { outDir: props.outDir } : undefined,
51 htmlHandling: "drop-trailing-slash",
52 }).pipe(Namespace.push(id));