Skip to content

Commit e94df02

Browse files
authored
feat: get version from package.json (#1979)
1 parent 2880903 commit e94df02

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ts-json-schema-generator.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { Command, Option } from "commander";
2-
import fs, { mkdirSync, writeFileSync } from "node:fs";
2+
import { mkdirSync, writeFileSync } from "node:fs";
33
import { dirname } from "node:path";
44
import stableStringify from "safe-stable-stringify";
55
import { createGenerator } from "./factory/generator.js";
66
import type { Config } from "./src/Config.js";
77
import { BaseError } from "./src/Error/BaseError.js";
88

9-
const pkg = JSON.parse(fs.readFileSync("package.json", "utf8"));
9+
import pkg from "./package.json";
1010

1111
const args = new Command()
1212
.option("-p, --path <path>", "Source file path")

0 commit comments

Comments
 (0)