Skip to content

Commit cde2e27

Browse files
committed
must override default config
1 parent 3758ea2 commit cde2e27

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

browser/lib/fetchConfig.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ const jetpack = require('fs-jetpack')
55
const userDataPath = remote.app.getPath('userData')
66
const configFile = 'config.json'
77

8+
const defaultConfig = {
9+
'editor-font-size': '14',
10+
'editor-font-family': 'Monaco, Consolas',
11+
'editor-indent-type': 'space',
12+
'editor-indent-size': '4',
13+
'preview-font-size': '14',
14+
'preview-font-family': 'Lato',
15+
'switch-preview': 'blur',
16+
'disable-direct-write': false
17+
}
18+
819
export default function fetchConfig () {
9-
return Object.assign({}, JSON.parse(jetpack.cwd(userDataPath).read(configFile, 'utf-8')))
20+
return Object.assign({}, defaultConfig, JSON.parse(jetpack.cwd(userDataPath).read(configFile, 'utf-8')))
1021
}

0 commit comments

Comments
 (0)