mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-15 02:36:36 +00:00
Remove RcParser.exec
This commit is contained in:
@@ -14,8 +14,6 @@ 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'
|
||||
|
||||
@@ -80,10 +78,6 @@ 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 () {
|
||||
|
||||
@@ -10,20 +10,6 @@ function parse () {
|
||||
return JSON.parse(sander.readFileSync(boostnotercPath).toString())
|
||||
}
|
||||
|
||||
function exec (boostnotercPath) {
|
||||
const config = this.parse(boostnotercPath)
|
||||
if (config.execs === undefined) return
|
||||
_.forEach(config.execs, (exec) => {
|
||||
try {
|
||||
eval(exec)
|
||||
} catch (e) {
|
||||
// Ignore any errors in ~/.boostnoterc
|
||||
console.log(e)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export default {
|
||||
parse,
|
||||
exec
|
||||
parse
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user