api: use version-info package & clean up start message

This commit is contained in:
wukko
2024-08-03 21:34:02 +06:00
parent 0d20ffc004
commit 40425ad3bf
7 changed files with 43 additions and 53 deletions

View File

@@ -7,6 +7,10 @@ const root = join(
'../../'
);
export function loadFile(path) {
return fs.readFileSync(join(root, path), 'utf-8')
}
export function loadJSON(path) {
try {
return JSON.parse(loadFile(path))
@@ -14,7 +18,3 @@ export function loadJSON(path) {
return false
}
}
export function loadFile(path) {
return fs.readFileSync(join(root, path), 'utf-8')
}