Skip to content

Commit

Permalink
chore(codegen): prettier format client typedoc.json (#4537)
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr authored Mar 16, 2023
1 parent 0750ed0 commit 0ff20eb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/generate-clients/copy-to-clients.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// @ts-check
const { join } = require("path");
const { copySync, removeSync } = require("fs-extra");
const prettier = require("prettier");
const { readdirSync, lstatSync, readFileSync, existsSync, writeFileSync } = require("fs");

const getOverwritableDirectories = (subDirectories, packageName) => {
Expand Down Expand Up @@ -161,7 +162,7 @@ const copyToClients = async (sourceDir, destinationDir, solo) => {
out: "docs",
readme: "README.md",
};
writeFileSync(destSubPath, JSON.stringify(typedocJson, null, 2).concat(`\n`));
writeFileSync(destSubPath, prettier.format(JSON.stringify(typedocJson), { parser: "json" }));
} else if (overWritableSubs.includes(packageSub) || !existsSync(destSubPath)) {
if (lstatSync(packageSubPath).isDirectory()) removeSync(destSubPath);
copySync(packageSubPath, destSubPath, {
Expand Down

0 comments on commit 0ff20eb

Please sign in to comment.