Skip to content

Commit

Permalink
docs: consistent camelCase variable names in README.md (#1883)
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-a-e authored Mar 7, 2024
1 parent 470e9f5 commit 2d0db36
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ const config = {
type: "*", // Or <type-name> if you want to generate schema for that one type only
};

const output_path = "path/to/output/file";
const outputPath = "path/to/output/file";

const schema = tsj.createGenerator(config).createSchema(config.type);
const schemaString = JSON.stringify(schema, null, 2);
fs.writeFile(output_path, schemaString, (err) => {
fs.writeFile(outputPath, schemaString, (err) => {
if (err) throw err;
});
```
Expand Down Expand Up @@ -131,9 +131,10 @@ const program = createProgram(config);
const parser = createParser(program, config);
const generator = new SchemaGenerator(program, parser, formatter, config);
const schema = generator.createSchema(config.type);
const outputPath = "path/to/output/file";

const schemaString = JSON.stringify(schema, null, 2);
fs.writeFile(output_path, schemaString, (err) => {
fs.writeFile(outputPath, schemaString, (err) => {
if (err) throw err;
});
```
Expand Down Expand Up @@ -183,9 +184,10 @@ const parser = createParser(program, config, (prs) => {
const formatter = createFormatter(config);
const generator = new SchemaGenerator(program, parser, formatter, config);
const schema = generator.createSchema(config.type);
const outputPath = "path/to/output/file";

const schemaString = JSON.stringify(schema, null, 2);
fs.writeFile(output_path, schemaString, (err) => {
fs.writeFile(outputPath, schemaString, (err) => {
if (err) throw err;
});
```
Expand Down

0 comments on commit 2d0db36

Please sign in to comment.