diff --git a/.changeset/young-wombats-prove.md b/.changeset/young-wombats-prove.md new file mode 100644 index 000000000..16745aad4 --- /dev/null +++ b/.changeset/young-wombats-prove.md @@ -0,0 +1,5 @@ +--- +"shadcn-svelte": patch +--- + +fix(next): add newline to end of `components.json` diff --git a/packages/cli/src/utils/get-config.ts b/packages/cli/src/utils/get-config.ts index 89235d2da..07ce90dd4 100644 --- a/packages/cli/src/utils/get-config.ts +++ b/packages/cli/src/utils/get-config.ts @@ -176,5 +176,5 @@ export async function getRawConfig(cwd: string): Promise { 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"); }