mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
Improve CLI prompts and template cleanup
This commit is contained in:
5
.changeset/three-clowns-notice.md
Normal file
5
.changeset/three-clowns-notice.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"create-better-t-stack": patch
|
||||
---
|
||||
|
||||
Improve package manager prompts
|
||||
@@ -8,7 +8,7 @@ export async function getNoInstallChoice(
|
||||
if (noInstall !== undefined) return noInstall;
|
||||
|
||||
const response = await confirm({
|
||||
message: "Install dependencies?",
|
||||
message: "Do you want to install project dependencies?",
|
||||
initialValue: !DEFAULT_CONFIG.noInstall,
|
||||
});
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { cancel, confirm, isCancel, select } from "@clack/prompts";
|
||||
import { cancel, isCancel, select } from "@clack/prompts";
|
||||
import pc from "picocolors";
|
||||
import type { PackageManager } from "../types";
|
||||
import { getUserPkgManager } from "../utils/get-package-manager";
|
||||
@@ -9,21 +9,16 @@ export async function getPackageManagerChoice(
|
||||
if (packageManager !== undefined) return packageManager;
|
||||
|
||||
const detectedPackageManager = getUserPkgManager();
|
||||
const useDetected = await confirm({
|
||||
message: `Use ${detectedPackageManager} as your package manager?`,
|
||||
});
|
||||
|
||||
if (isCancel(useDetected)) {
|
||||
cancel(pc.red("Operation cancelled"));
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
if (useDetected) return detectedPackageManager;
|
||||
|
||||
const response = await select<PackageManager>({
|
||||
message: "Which package manager would you like to use?",
|
||||
message: "Which package manager do you want to use?",
|
||||
options: [
|
||||
{ value: "npm", label: "npm", hint: "Node Package Manager" },
|
||||
{
|
||||
value: "bun",
|
||||
label: "bun",
|
||||
hint: "All-in-one JavaScript runtime & toolkit",
|
||||
},
|
||||
{
|
||||
value: "pnpm",
|
||||
label: "pnpm",
|
||||
@@ -34,13 +29,8 @@ export async function getPackageManagerChoice(
|
||||
label: "yarn",
|
||||
hint: "Fast, reliable, and secure dependency management",
|
||||
},
|
||||
{
|
||||
value: "bun",
|
||||
label: "bun",
|
||||
hint: "All-in-one JavaScript runtime & toolkit",
|
||||
},
|
||||
],
|
||||
initialValue: "bun",
|
||||
initialValue: detectedPackageManager,
|
||||
});
|
||||
|
||||
if (isCancel(response)) {
|
||||
|
||||
@@ -44,14 +44,6 @@
|
||||
--color-chart-5: hsl(var(--chart-5));
|
||||
}
|
||||
|
||||
/*
|
||||
The default border color has changed to `currentColor` in Tailwind CSS v4,
|
||||
so we've added these compatibility styles to make sure everything still
|
||||
looks the same as it did with Tailwind CSS v3.
|
||||
|
||||
If we ever want to remove these styles, we need to add an explicit border
|
||||
color utility to any element that depends on these defaults.
|
||||
*/
|
||||
@layer base {
|
||||
*,
|
||||
::after,
|
||||
|
||||
@@ -10,7 +10,6 @@ function HomeComponent() {
|
||||
return (
|
||||
<div className="p-2">
|
||||
<h3>Welcome Home!</h3>
|
||||
<Link to="/dashboard">Go to Dashboard</Link>
|
||||
<p>healthCheck: {healthCheck.data}</p>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
VITE_SERVER_URL=http://localhost:3000
|
||||
@@ -3,7 +3,7 @@ import { PrismaLibSQL } from "@prisma/adapter-libsql";
|
||||
import { createClient } from "@libsql/client";
|
||||
|
||||
const libsql = createClient({
|
||||
url: process.env.TURSO_DATABASE_URL,
|
||||
url: process.env.TURSO_DATABASE_URL!,
|
||||
authToken: process.env.TURSO_AUTH_TOKEN,
|
||||
});
|
||||
|
||||
|
||||
@@ -4,6 +4,6 @@ import prisma from "../db";
|
||||
|
||||
export const auth = betterAuth({
|
||||
database: prismaAdapter(prisma, {
|
||||
provider: "sqlite", // or "mysql", "postgresql", ...etc
|
||||
provider: "sqlite",
|
||||
}),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user