mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
enhance applying config
This commit is contained in:
10
browser/lib/fetchConfig.js
Normal file
10
browser/lib/fetchConfig.js
Normal 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')))
|
||||
}
|
||||
Reference in New Issue
Block a user