import type { Context } from "../context.js"; import { Resource } from "../resource.js"; /** * Type of integrations that can be added to an Astro project */ export type AstroIntegration = "react" | "preact" | "vue" | "svelte" | "solid" | "lit" | "tailwind" | "mdx" | "sitemap" | "partytown" | "markdoc"; /** * Properties for creating an Astro project */ export interface AstroProjectProps { /** * The name/path of the project */ name: string; /** * The title of the site * @default "Astro Site" */ title?: string; /** * The description of the site * @default "Welcome to my Astro site" */ description?: string; /** * The directory to initialize the project in. * @default {@link name} */ dir?: string; /** * The integrations to add to the project * @default [] */ integrations?: AstroIntegration[]; /** * The TypeScript configuration */ tsconfig?: { /** * Extends from this TypeScript configuration */ extends?: string; /** * References to add to the tsconfig */ references?: string[]; /** * Compiler options to add to the tsconfig */ compilerOptions?: Record; }; /** * Whether to delete the project folder during the delete phase * @default true */ delete?: boolean; /** * Add Shadcn UI to the project * @default false */ shadcn?: { /** * The base color to use * @default "neutral" */ baseColor?: "neutral" | "gray" | "zinc" | "stone" | "slate"; /** * Use default configuration * @default false */ defaults?: boolean; /** * Force overwrite of existing configuration * @default false */ force?: boolean; /** * Mute output * @default false */ silent?: boolean; /** * Use the src directory when creating a new project * @default true */ srcDir?: boolean; /** * Use css variables for theming * @default true */ cssVariables?: boolean; /** * The components to add */ components?: string[]; }; /** * The dependencies to install */ dependencies?: Record; /** * The dev dependencies to install */ devDependencies?: Record; /** * Additional scripts to add to package.json */ scripts?: Record; } /** * Astro project resource */ export interface AstroProject extends AstroProjectProps, Resource { /** * The name/path of the project */ name: string; } /** * Creates a new Astro project * * @example * // Create a basic Astro project * const basicProject = await AstroProject("my-astro-app", { * title: "My Astro Site", * description: "Built with Alchemy" * }); * * @example * // Create an Astro project with React and Tailwind * const reactProject = await AstroProject("astro-react", { * title: "Astro + React", * integrations: ["react", "tailwind"] * }); * * @example * // Create an Astro project with Shadcn UI * const shadcnProject = await AstroProject("astro-shadcn", { * title: "Astro with Shadcn UI", * integrations: ["react", "tailwind"], * shadcn: { * baseColor: "zinc", * components: ["button", "card", "input"] * } * }); */ export declare const AstroProject: (((this: any, id: string, props?: {}) => never) & (new (_: never) => never)) | ((this: Context, id: string, props: AstroProjectProps) => Promise); //# sourceMappingURL=astro.d.ts.map