Skip to content

Commit b00e9a7

Browse files
committed
Update CLI
1 parent cb89d4b commit b00e9a7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cli/generateschema.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@ export {}
33
const tsj = require('ts-json-schema-generator');
44
const fs = require('fs');
55

6-
const directory = fs.readdirSync('./converter/types/').filter((f: string) => f.endsWith('.ts'));
6+
const directory = fs.readdirSync('./converters/types/').filter((f: string) => f.endsWith('.ts'));
77

88
directory.forEach((f: string) => {
9-
const file = fs.readFileSync(`./converter/types/${f}`, 'utf8');
9+
const file = fs.readFileSync(`./converters/types/${f}`, 'utf8');
1010

1111
const regex = /\/\/ @ToolBox - ([a-zA-Z]{1,30})/;
1212
const match = file.match(regex);
1313

1414
if (!match || match.length < 2) return;
1515

1616
const schema = tsj.createGenerator({
17-
path: `./converter/types/${f}`,
17+
path: `./converters/types/${f}`,
1818
tsconfig: './tsconfig.json',
1919
type: match[1]
2020
}).createSchema(match[1])
2121

2222
const schemaString = JSON.stringify(schema, null, 2);
23-
fs.writeFileSync(`./converter/types/${f.replace('.ts', '.json')}`, schemaString);
23+
fs.writeFileSync(`./converters/types/${f.replace('.ts', '.json')}`, schemaString);
2424
})

0 commit comments

Comments
 (0)