Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

Commit 249106a

Browse files
committed
refactor: just asking for tailwind 4
1 parent 29aee5e commit 249106a

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/commands/start-new-project/index.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,13 @@ export async function startNewProject() {
8585
/**
8686
* This question will be removed when Tailwind v4 is released as stable.
8787
*/
88-
const tailwindVersion = await input({
89-
message: `Which Tailwind version do you want to use? (${grayText("3")}/4)`,
90-
default: "4",
91-
validate: (value) => ["3", "4"].includes(value.trim().toLowerCase()) || "Please choose 3 or 4.",
88+
const areYouWantToUseTailwind4 = await input({
89+
message: `Do you want to use Tailwind version 4? (Y/${grayText("n")})`,
90+
default: "Y",
91+
validate: (value) => {
92+
const normalizedValue = value.trim().toLowerCase()
93+
return ["y", "n", "yes", "no"].includes(normalizedValue) || "Please answer yes, no, Y, or n."
94+
},
9295
})
9396

9497
const usePrettier = await input({
@@ -133,7 +136,7 @@ export async function startNewProject() {
133136
/**
134137
* This condition will be removed when Tailwind v4 is released as stable.
135138
*/
136-
if (tailwindVersion === "4") {
139+
if (areYouWantToUseTailwind4) {
137140
const upgradeTailwindCommand = ["npx", "@tailwindcss/upgrade@next", "--force"]
138141
await executeCommand(upgradeTailwindCommand, "Upgrading to Tailwind CSS v4.")
139142
}

0 commit comments

Comments
 (0)