@reddigital/quickstart
Version:
Frontend island architecture for Adonisjs
43 lines (41 loc) • 1.57 kB
TypeScript
interface QuickstartConfig {
/** Directory where component files live (relative to project root) */
componentDir?: string;
/** Framework being used (determines component file extensions) */
framework?: 'svelte' | 'preact' | 'vue';
/** SSR configuration */
ssr: {
/** Path to the SSR entrypoint file */
entryPoint: string;
};
}
interface QuickstartResolvedConfig {
/** Directory where component files live (relative to project root) */
componentDir: string;
/** Framework being used (determines component file extensions) */
framework: 'svelte' | 'preact' | 'vue';
/** SSR configuration */
ssr: {
/** Path to the SSR entrypoint file */
entryPoint: string;
/** Output directory name for SSR build (relative to project root) */
buildDirectory: string;
/** Path to the Vite manifest for SSR (relative to project root) */
manifestFile: string;
};
}
interface SSRClientConfig<T> {
render(component: T, props: any): Promise<string> | string;
}
interface ClientConfig<T> {
resolve: (path: string, resolver?: (path: string, ext: string) => Promise<T>) => Promise<T>;
hydrate: (component: T, options: {
target: HTMLElement;
props: any;
}) => void;
}
/**
* Get the file extension for a given framework
*/
declare function getFrameworkExtension(framework: 'svelte' | 'preact' | 'vue'): string;
export { type ClientConfig, type QuickstartConfig, type QuickstartResolvedConfig, type SSRClientConfig, getFrameworkExtension };