refactor: print trailing new line when outputting JSON (#6186)

* refactor(core): print trailing new line when writing translation

* Print these as well
This commit is contained in:
Joshua Chen 2021-12-24 22:11:35 +08:00 committed by GitHub
parent a17deb6aa2
commit 1460f867d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View file

@ -35,7 +35,7 @@ async function updatePkg(pkgPath: string, obj: Record<string, unknown>) {
const pkg = JSON.parse(content);
const newPkg = Object.assign(pkg, obj);
await fs.outputFile(pkgPath, JSON.stringify(newPkg, null, 2));
await fs.outputFile(pkgPath, `${JSON.stringify(newPkg, null, 2)}\n`);
}
function readTemplates(templatesDir: string) {