Skip to content

Commit 640e64e

Browse files
Improve CLI prompts and template cleanup
1 parent 8316841 commit 640e64e

File tree

8 files changed

+16
-31
lines changed

8 files changed

+16
-31
lines changed

.changeset/three-clowns-notice.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"create-better-t-stack": patch
3+
---
4+
5+
Improve package manager prompts

apps/cli/src/prompts/install.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export async function getNoInstallChoice(
88
if (noInstall !== undefined) return noInstall;
99

1010
const response = await confirm({
11-
message: "Install dependencies?",
11+
message: "Do you want to install project dependencies?",
1212
initialValue: !DEFAULT_CONFIG.noInstall,
1313
});
1414

apps/cli/src/prompts/package-manager.ts

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { cancel, confirm, isCancel, select } from "@clack/prompts";
1+
import { cancel, isCancel, select } from "@clack/prompts";
22
import pc from "picocolors";
33
import type { PackageManager } from "../types";
44
import { getUserPkgManager } from "../utils/get-package-manager";
@@ -9,21 +9,16 @@ export async function getPackageManagerChoice(
99
if (packageManager !== undefined) return packageManager;
1010

1111
const detectedPackageManager = getUserPkgManager();
12-
const useDetected = await confirm({
13-
message: `Use ${detectedPackageManager} as your package manager?`,
14-
});
15-
16-
if (isCancel(useDetected)) {
17-
cancel(pc.red("Operation cancelled"));
18-
process.exit(0);
19-
}
20-
21-
if (useDetected) return detectedPackageManager;
2212

2313
const response = await select<PackageManager>({
24-
message: "Which package manager would you like to use?",
14+
message: "Which package manager do you want to use?",
2515
options: [
2616
{ value: "npm", label: "npm", hint: "Node Package Manager" },
17+
{
18+
value: "bun",
19+
label: "bun",
20+
hint: "All-in-one JavaScript runtime & toolkit",
21+
},
2722
{
2823
value: "pnpm",
2924
label: "pnpm",
@@ -34,13 +29,8 @@ export async function getPackageManagerChoice(
3429
label: "yarn",
3530
hint: "Fast, reliable, and secure dependency management",
3631
},
37-
{
38-
value: "bun",
39-
label: "bun",
40-
hint: "All-in-one JavaScript runtime & toolkit",
41-
},
4232
],
43-
initialValue: "bun",
33+
initialValue: detectedPackageManager,
4434
});
4535

4636
if (isCancel(response)) {

apps/cli/template/base/packages/client/src/index.css

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,6 @@
4444
--color-chart-5: hsl(var(--chart-5));
4545
}
4646

47-
/*
48-
The default border color has changed to `currentColor` in Tailwind CSS v4,
49-
so we've added these compatibility styles to make sure everything still
50-
looks the same as it did with Tailwind CSS v3.
51-
52-
If we ever want to remove these styles, we need to add an explicit border
53-
color utility to any element that depends on these defaults.
54-
*/
5547
@layer base {
5648
*,
5749
::after,

apps/cli/template/base/packages/client/src/routes/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ function HomeComponent() {
1010
return (
1111
<div className="p-2">
1212
<h3>Welcome Home!</h3>
13-
<Link to="/dashboard">Go to Dashboard</Link>
1413
<p>healthCheck: {healthCheck.data}</p>
1514
</div>
1615
);

apps/cli/template/with-auth/packages/client/_env

Lines changed: 0 additions & 1 deletion
This file was deleted.

apps/cli/template/with-prisma-sqlite/packages/server/src/db/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { PrismaLibSQL } from "@prisma/adapter-libsql";
33
import { createClient } from "@libsql/client";
44

55
const libsql = createClient({
6-
url: process.env.TURSO_DATABASE_URL,
6+
url: process.env.TURSO_DATABASE_URL!,
77
authToken: process.env.TURSO_AUTH_TOKEN,
88
});
99

apps/cli/template/with-prisma-sqlite/packages/server/src/lib/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ import prisma from "../db";
44

55
export const auth = betterAuth({
66
database: prismaAdapter(prisma, {
7-
provider: "sqlite", // or "mysql", "postgresql", ...etc
7+
provider: "sqlite",
88
}),
99
});

0 commit comments

Comments
 (0)