Skip to content

Commit

Permalink
fix: make it clean
Browse files Browse the repository at this point in the history
  • Loading branch information
irsyadadl committed Dec 20, 2024
1 parent 1ed49e7 commit 5c06abd
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/commands/start-new-project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export async function startNewProject() {

const createAppCommand = frameworks[framework].createCommand(packageManager, projectName)

await executeCommand(createAppCommand, `Creating ${frameworks[framework].name} project...`)
await executeCommand(createAppCommand, `Creating ${frameworks[framework].name} project.`)

process.chdir(projectName)
if (framework === "vite") {
Expand All @@ -131,20 +131,20 @@ export async function startNewProject() {
? ["pnpm", "add", "-D", "tailwindcss", "postcss", "autoprefixer"]
: ["npm", "install", "-D", "tailwindcss", "postcss", "autoprefixer"]

await executeCommand(setupTailwindCommand, "Setting up Tailwind CSS...")
await executeCommand(["npx", "tailwindcss", "init", "-p"], "Initializing Tailwind CSS...")
await executeCommand(setupTailwindCommand, "Setting up Tailwind CSS.")
await executeCommand(["npx", "tailwindcss", "init", "-p"], "Initializing Tailwind CSS.")
}

/**
* This condition will be removed when Tailwind v4 is released as stable.
*/
if (tailwindVersion === "4") {
const upgradeTailwindCommand = ["npx", "@tailwindcss/upgrade@next", "--force"]
await executeCommand(upgradeTailwindCommand, "Upgrading to Tailwind CSS v4...")
await executeCommand(upgradeTailwindCommand, "Upgrading to Tailwind CSS v4.")
}

const initJustdCommand = ["npx", justdCliVersion, "init", "--force", "--yes"]
await executeCommand(initJustdCommand, "Initializing Justd")
await executeCommand(initJustdCommand, "Initializing Justd.")

console.info("\nProject setup is now complete.")
console.info(`Start your development server by running: ${highlight(`cd ${projectName} && npm run dev`)}\n`)
Expand Down Expand Up @@ -179,7 +179,7 @@ async function executeCommand(command: string[], message: string) {
spinner.fail(`Command failed: ${command.join(" ")}`)
reject(new Error(`Command failed: ${command.join(" ")}`))
} else {
spinner.succeed(`Success: ${message}`)
spinner.succeed(message)
resolve()
}
})
Expand Down

0 comments on commit 5c06abd

Please sign in to comment.