1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

enhance applying config

This commit is contained in:
Rokt33r
2016-01-10 04:25:00 +09:00
parent c14827b234
commit 5df0755252
7 changed files with 62 additions and 32 deletions

View File

@@ -0,0 +1,10 @@
const electron = require('electron')
const remote = electron.remote
const jetpack = require('fs-jetpack')
const userDataPath = remote.app.getPath('userData')
const configFile = 'config.json'
export default function fetchConfig () {
return Object.assign({}, JSON.parse(jetpack.cwd(userDataPath).read(configFile, 'utf-8')))
}