mirror of
https://github.com/Eugeny/tabby.git
synced 2024-11-27 00:50:49 +03:00
14 lines
370 B
TypeScript
14 lines
370 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.safeLoad(fs.readFileSync(configPath, 'utf8'))
|
|
} else {
|
|
return {}
|
|
}
|
|
}
|