Add todo example, remove yarn, change schema structure, update readme

This commit is contained in:
Aman Varshney
2025-03-24 00:04:53 +05:30
parent 5076bf4176
commit 4cc13bf382
42 changed files with 525 additions and 443 deletions

View File

@@ -49,6 +49,20 @@ export function generateReproducibleCommand(config: ProjectConfig): string {
flags.push("--no-addons");
}
if (config.examples && config.examples.length > 0) {
flags.push(`--examples ${config.examples.join(",")}`);
} else {
flags.push("--no-examples");
}
if (config.database === "sqlite") {
if (config.turso) {
flags.push("--turso");
} else {
flags.push("--no-turso");
}
}
const baseCommand = "npx create-better-t-stack";
const projectName = config.projectName ? ` ${config.projectName}` : "";
const flagString = flags.length > 0 ? ` ${flags.join(" ")}` : "";

View File

@@ -1,11 +1,8 @@
export type PackageManager = "npm" | "pnpm" | "yarn" | "bun";
import type { PackageManager } from "../types";
export const getUserPkgManager: () => PackageManager = () => {
const userAgent = process.env.npm_config_user_agent;
if (userAgent?.startsWith("yarn")) {
return "yarn";
}
if (userAgent?.startsWith("pnpm")) {
return "pnpm";
}