@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 49 lines 1.5 KB
Raw
1 import { frameworkSite, type FrameworkSiteProps } from "./FrameworkSite.ts";
2
3 /** The framework-integration package that drives the Nuxt build. */
4 export const NUXT_FRAMEWORK_SPECIFIER = "@alchemy.run/frontend-frameworks/nuxt";
5
6 /** The Node container deploy target for the Nuxt build. */
7 export const NUXT_NODE_TARGET_SPECIFIER = "@alchemy.run/frontend-frameworks/nuxt/node";
8
9 export interface NuxtProps extends FrameworkSiteProps {
10 /**
11 * Nuxt config overrides merged over the project's own `nuxt.config.ts`
12 * (highest-priority layer). `nitro.preset` is owned by the Node deploy
13 * target and may not be set here.
14 */
15 nuxt?: Record<string, unknown>;
16 }
17
18 /**
19 * Deploy a Nuxt application to Cloud Run: the nitro Node server in a Cloud Run container,
20 * static assets (prerendered pages included) baked into the image.
21 *
22 *
23 * ### Creating Nuxt Sites
24 * **Example:** Basic Nuxt App
25 * ```typescript
26 * const site = yield* GCP.Website.Nuxt("Web", {
27 * rootDir: "./app",
28 * });
29 * ```
30 *
31 * **Example:** Warm Instance with More Memory
32 * ```typescript
33 * const site = yield* GCP.Website.Nuxt("Web", {
34 * rootDir: "./app",
35 * scaling: { minInstanceCount: 1 },
36 * resources: { limits: { cpu: "1", memory: "1Gi" } },
37 * });
38 * ```
39 *
40 * @resource
41 * @product Website
42 */
43 export const Nuxt = (id: string, props: NuxtProps = {}) =>
44 frameworkSite(id, props, {
45 name: "Nuxt",
46 framework: NUXT_FRAMEWORK_SPECIFIER,
47 target: NUXT_NODE_TARGET_SPECIFIER,
48 options: props.nuxt ? { nuxt: props.nuxt } : undefined,
49 });