mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
Add backend framework selection between hono, elysiajs
This commit is contained in:
@@ -5,6 +5,7 @@ import pc from "picocolors";
|
||||
import type { ProjectConfig } from "../types";
|
||||
import { setupAddons } from "./addons-setup";
|
||||
import { setupAuth } from "./auth-setup";
|
||||
import { setupBackendDependencies } from "./backend-framework-setup";
|
||||
import { createReadme } from "./create-readme";
|
||||
import { setupDatabase } from "./db-setup";
|
||||
import { setupEnvironmentVariables } from "./env-setup";
|
||||
@@ -16,6 +17,7 @@ import {
|
||||
copyBaseTemplate,
|
||||
fixGitignoreFiles,
|
||||
setupAuthTemplate,
|
||||
setupBackendFramework,
|
||||
setupOrmTemplate,
|
||||
} from "./template-manager";
|
||||
|
||||
@@ -27,10 +29,14 @@ export async function createProject(options: ProjectConfig): Promise<string> {
|
||||
await fs.ensureDir(projectDir);
|
||||
|
||||
await copyBaseTemplate(projectDir);
|
||||
|
||||
await fixGitignoreFiles(projectDir);
|
||||
|
||||
await setupAuthTemplate(projectDir, options.auth);
|
||||
await setupBackendFramework(projectDir, options.backendFramework);
|
||||
await setupBackendDependencies(
|
||||
projectDir,
|
||||
options.backendFramework,
|
||||
options.runtime,
|
||||
);
|
||||
|
||||
await setupOrmTemplate(
|
||||
projectDir,
|
||||
@@ -39,15 +45,6 @@ export async function createProject(options: ProjectConfig): Promise<string> {
|
||||
options.auth,
|
||||
);
|
||||
|
||||
await setupRuntime(projectDir, options.runtime);
|
||||
|
||||
await setupExamples(
|
||||
projectDir,
|
||||
options.examples,
|
||||
options.orm,
|
||||
options.auth,
|
||||
);
|
||||
|
||||
await setupDatabase(
|
||||
projectDir,
|
||||
options.database,
|
||||
@@ -55,8 +52,24 @@ export async function createProject(options: ProjectConfig): Promise<string> {
|
||||
options.turso ?? options.database === "sqlite",
|
||||
);
|
||||
|
||||
await setupAuthTemplate(
|
||||
projectDir,
|
||||
options.auth,
|
||||
options.backendFramework,
|
||||
options.orm,
|
||||
options.database,
|
||||
);
|
||||
await setupAuth(projectDir, options.auth);
|
||||
|
||||
await setupRuntime(projectDir, options.runtime, options.backendFramework);
|
||||
|
||||
await setupExamples(
|
||||
projectDir,
|
||||
options.examples,
|
||||
options.orm,
|
||||
options.auth,
|
||||
);
|
||||
|
||||
await setupEnvironmentVariables(projectDir, options);
|
||||
|
||||
await initializeGit(projectDir, options.git);
|
||||
@@ -66,7 +79,6 @@ export async function createProject(options: ProjectConfig): Promise<string> {
|
||||
}
|
||||
|
||||
await updatePackageConfigurations(projectDir, options);
|
||||
|
||||
await createReadme(projectDir, options);
|
||||
|
||||
displayPostInstallInstructions(
|
||||
|
||||
Reference in New Issue
Block a user