mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
Add todo example, remove yarn, change schema structure, update readme
This commit is contained in:
@@ -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(" ")}` : "";
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user