Skip to content

Commit

Permalink
fix(next): add newline to end of components.json (#1479)
Browse files Browse the repository at this point in the history
Co-authored-by: CokaKoala <[email protected]>
  • Loading branch information
kaechele and AdrianGonz97 authored Nov 12, 2024
1 parent d856a12 commit fb7c683
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/young-wombats-prove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"shadcn-svelte": patch
---

fix(next): add newline to end of `components.json`
2 changes: 1 addition & 1 deletion packages/cli/src/utils/get-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,5 +176,5 @@ export async function getRawConfig(cwd: string): Promise<RawConfig | null> {
export function writeConfig(cwd: string, config: any): void {
const targetPath = path.resolve(cwd, "components.json");
const conf = v.parse(rawConfigSchema, config); // inefficient, but it'll do
fs.writeFileSync(targetPath, JSON.stringify(conf, null, "\t"), "utf8");
fs.writeFileSync(targetPath, JSON.stringify(conf, null, "\t") + "\n", "utf8");
}

0 comments on commit fb7c683

Please sign in to comment.