From cde2e27e049136519fb05c6e3791a5ae48dfb04d Mon Sep 17 00:00:00 2001 From: Rokt33r Date: Tue, 19 Jan 2016 18:47:10 +0900 Subject: [PATCH] must override default config --- browser/lib/fetchConfig.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/browser/lib/fetchConfig.js b/browser/lib/fetchConfig.js index a59bbf97..bd57d4ca 100644 --- a/browser/lib/fetchConfig.js +++ b/browser/lib/fetchConfig.js @@ -5,6 +5,17 @@ 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'))) +const defaultConfig = { + 'editor-font-size': '14', + 'editor-font-family': 'Monaco, Consolas', + 'editor-indent-type': 'space', + 'editor-indent-size': '4', + 'preview-font-size': '14', + 'preview-font-family': 'Lato', + 'switch-preview': 'blur', + 'disable-direct-write': false +} + +export default function fetchConfig () { + return Object.assign({}, defaultConfig, JSON.parse(jetpack.cwd(userDataPath).read(configFile, 'utf-8'))) }