1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-14 10:16:26 +00:00

Enable to set configs in ~/.boostnoterc

This commit is contained in:
asmsuechan
2017-08-10 09:43:50 +09:00
parent a6fe3c27d4
commit 6c43fb2325
2 changed files with 21 additions and 2 deletions

View File

@@ -14,6 +14,10 @@ import InitModal from 'browser/main/modals/InitModal'
import mixpanel from 'browser/main/lib/mixpanel'
import mobileAnalytics from 'browser/main/lib/AwsMobileAnalyticsConfig'
import eventEmitter from 'browser/main/lib/eventEmitter'
import RcParser from 'browser/main/lib/RcParser'
import path from 'path'
const BOOSTNOTERC = '.boostnoterc'
function focused () {
mixpanel.track('MAIN_FOCUSED')
@@ -76,6 +80,10 @@ class Main extends React.Component {
eventEmitter.on('editor:fullscreen', this.toggleFullScreen)
window.addEventListener('focus', focused)
const homePath = global.process.env.HOME || global.process.env.USERPROFILE
const boostnotercPath = path.join(homePath, BOOSTNOTERC)
RcParser.exec(boostnotercPath)
}
componentWillUnmount () {