We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a882531 commit 6988308Copy full SHA for 6988308
scripts/generate-clients/code-prettify.js
@@ -1,21 +1,11 @@
1
-const path = require("path");
2
-const { readdirSync } = require("fs");
3
const { spawnProcess } = require("./spawn-process");
4
const { CODE_GEN_OUTPUT_DIR } = require("./code-gen-dir");
5
6
const prettifyCode = async () => {
7
- for (const modelName of readdirSync(CODE_GEN_OUTPUT_DIR)) {
8
- if (modelName === "source") continue;
9
- const artifactPath = path.join(
10
- CODE_GEN_OUTPUT_DIR,
11
- modelName,
12
- "typescript-codegen"
13
- );
14
- await spawnProcess("./node_modules/.bin/prettier", [
15
- "--write",
16
- `${artifactPath}/**/*.{ts,md,json}`
17
- ]);
18
- }
+ await spawnProcess("./node_modules/.bin/prettier", [
+ "--write",
+ `${CODE_GEN_OUTPUT_DIR}/**/*.{ts,js,md,json}`
+ ]);
19
};
20
21
module.exports = {
0 commit comments