@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 48 lines 1.41 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 Fly: the nitro Node server on a Machine,
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* Fly.Website.Nuxt("Web", {
27 * rootDir: "./app",
28 * });
29 * ```
30 *
31 * **Example:** Custom Domain
32 * ```typescript
33 * const site = yield* Fly.Website.Nuxt("Web", {
34 * rootDir: "./app",
35 * domain: "app.example.com",
36 * });
37 * ```
38 *
39 * @resource
40 * @product Website
41 */
42 export const Nuxt = (id: string, props: NuxtProps = {}) =>
43 frameworkSite(id, props, {
44 name: "Nuxt",
45 framework: NUXT_FRAMEWORK_SPECIFIER,
46 target: NUXT_NODE_TARGET_SPECIFIER,
47 options: props.nuxt ? { nuxt: props.nuxt } : undefined,
48 });