1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-11-28 22:52:03 +03:00
tabby/app/lib/config.ts
2021-01-28 21:52:11 +01:00

14 lines
366 B
TypeScript

import * as fs from 'fs'
import * as path from 'path'
import * as yaml from 'js-yaml'
import { app } from 'electron'
export function loadConfig (): any {
const configPath = path.join(app.getPath('userData'), 'config.yaml')
if (fs.existsSync(configPath)) {
return yaml.load(fs.readFileSync(configPath, 'utf8'))
} else {
return {}
}
}