sv
Version:
A CLI for creating and updating SvelteKit projects
32 lines (31 loc) • 930 B
TypeScript
export { addPnpmBuildDependencies } from '../utils/package-manager.js';
export type ProjectVariant = 'kit-js' | 'kit-ts' | 'vite-js' | 'vite-ts';
export type CreateProject = (options: {
testId: string;
variant: ProjectVariant;
/** @default true */
clean?: boolean;
}) => string;
type SetupOptions = {
cwd: string;
variants: readonly ProjectVariant[];
/** @default false */
clean?: boolean;
};
export declare function setup({ cwd, clean, variants }: SetupOptions): Promise<{
templatesDir: string;
}>;
type CreateOptions = {
cwd: string;
testName: string;
templatesDir: string;
};
export declare function createProject({ cwd, testName, templatesDir }: CreateOptions): CreateProject;
type PreviewOptions = {
cwd: string;
command?: string;
};
export declare function startPreview({ cwd, command }: PreviewOptions): Promise<{
url: string;
close: () => Promise<void>;
}>;