Skip to content

Commit

Permalink
chore: add overwrite notice for stylesheet and tailwind config (#1070)
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianGonz97 authored May 4, 2024
1 parent 8a77b9a commit 2d80e21
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/large-wolves-tease.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"shadcn-svelte": patch
---

chore: Added an overwrite notice for the global stylesheet and tailwind config
6 changes: 3 additions & 3 deletions packages/cli/src/commands/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ async function promptForConfig(cwd: string, defaultConfig: Config | null) {
const detectedConfigs = detectConfigs(cwd, { relative: true });

const typescript = await p.confirm({
message: `Would you like to use ${highlight("TypeScript")} (recommended)?`,
message: `Would you like to use ${highlight("TypeScript")}? ${color.gray("(recommended)")}`,
initialValue: defaultConfig?.typescript ?? cliConfig.DEFAULT_TYPESCRIPT,
});
if (p.isCancel(typescript)) {
Expand Down Expand Up @@ -102,7 +102,7 @@ async function promptForConfig(cwd: string, defaultConfig: Config | null) {
}),
tailwindCss: () =>
p.text({
message: `Where is your ${highlight("global CSS")} file?`,
message: `Where is your ${highlight("global CSS")} file? ${color.gray("(this file will be overwritten)")}`,
initialValue:
defaultConfig?.tailwind.css ??
detectedConfigs.cssPath ??
Expand All @@ -117,7 +117,7 @@ async function promptForConfig(cwd: string, defaultConfig: Config | null) {
}),
tailwindConfig: () =>
p.text({
message: `Where is your ${highlight("Tailwind config")} located?`,
message: `Where is your ${highlight("Tailwind config")} located? ${color.gray("(this file will be overwritten)")}`,
initialValue:
defaultConfig?.tailwind.config ??
detectedConfigs.tailwindPath ??
Expand Down

0 comments on commit 2d80e21

Please sign in to comment.