Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix the typo in error messages (component.jsoncomponents.json) #4977

Merged
merged 3 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/rare-bugs-repair.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"shadcn": patch
---

fix typo in components.json
4 changes: 2 additions & 2 deletions packages/shadcn/src/commands/add.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,13 @@ export const add = new Command()

let { errors, config } = await preFlightAdd(options)

// No component.json file. Prompt the user to run init.
// No components.json file. Prompt the user to run init.
if (errors[ERRORS.MISSING_CONFIG]) {
const { proceed } = await prompts({
type: "confirm",
name: "proceed",
message: `You need to create a ${highlighter.info(
"component.json"
"components.json"
)} file to add components. Proceed?`,
initial: true,
})
Expand Down
2 changes: 1 addition & 1 deletion packages/shadcn/src/utils/get-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export async function getRawConfig(cwd: string): Promise<RawConfig | null> {

return rawConfigSchema.parse(configResult.config)
} catch (error) {
const componentPath = `${cwd}/component.json`
const componentPath = `${cwd}/components.json`
throw new Error(
`Invalid configuration found in ${highlighter.info(componentPath)}.`
)
Expand Down
Loading