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