@idealyst/cli
Version:
CLI tool for generating Idealyst Framework projects
46 lines (45 loc) • 3.03 kB
TypeScript
import { TemplateData } from '../types';
export declare function validateProjectName(name: string): boolean;
export declare function getTemplatePath(templateName: string): string;
export declare function createPackageName(name: string): string;
export declare function updateWorkspacePackageJson(workspacePath: string, directory: string): Promise<void>;
export declare function copyTemplate(templatePath: string, destPath: string, data: TemplateData): Promise<void>;
export declare function processTemplateFiles(dir: string, data: TemplateData): Promise<void>;
export declare function processTemplateFile(filePath: string, data: TemplateData): Promise<void>;
export declare function installDependencies(projectPath: string, skipInstall?: boolean): Promise<void>;
export declare function runCommand(command: string, args: string[], options: {
cwd: string;
timeout?: number;
}): Promise<void>;
export declare function getTemplateData(projectName: string, description?: string, appName?: string, workspaceScope?: string): TemplateData;
/**
* Detects if we're in a workspace root directory
*/
export declare function isWorkspaceRoot(directory: string): Promise<boolean>;
/**
* Gets the workspace scope from the workspace root's package.json
* Extracts just the scope name (without @) from scoped package names
*/
export declare function getWorkspaceName(directory: string): Promise<string | null>;
/**
* Resolves the correct project path for individual projects (native, web, shared).
* Individual projects can ONLY be created within an existing workspace.
* This enforces proper monorepo structure and prevents scattered individual projects.
*/
export declare function resolveProjectPath(projectName: string, directory: string): Promise<{
projectPath: string;
workspacePath: string;
workspaceScope: string | null;
}>;
export declare function initializeReactNativeProject(projectName: string, directory: string, displayName?: string, skipInstall?: boolean): Promise<void>;
export declare function overlayIdealystFiles(templatePath: string, projectPath: string, data: TemplateData): Promise<void>;
export declare function mergePackageJsonDependencies(templatePath: string, projectPath: string, data: TemplateData): Promise<void>;
export declare function promptForProjectName(): Promise<string>;
export declare function promptForProjectType(): Promise<string>;
export declare function promptForAppName(projectName: string): Promise<string>;
export declare function promptForTrpcIntegration(): Promise<boolean>;
export declare function copyTrpcFiles(templatePath: string, projectPath: string, data: TemplateData): Promise<void>;
export declare function copyTrpcAppComponent(templatePath: string, projectPath: string, data: TemplateData): Promise<void>;
export declare function addTrpcDependencies(projectPath: string): Promise<void>;
export declare function removeTrpcDependencies(projectPath: string): Promise<void>;
export declare function configureAndroidVectorIcons(projectPath: string): Promise<void>;