1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

Revert "updated lib/consts to access electron remote.app only when in production mode"

This reverts commit bbcd674516.
This commit is contained in:
Yu-Hung Ou
2018-03-15 22:12:22 +11:00
parent f72b4f0249
commit 8bf5d02624

View File

@@ -1,9 +1,10 @@
const path = require('path')
const fs = require('sander')
const { remote } = require('electron')
const { app } = remote
const themePath = process.env.NODE_ENV === 'production'
? path.join(remote.app.getAppPath(), './node_modules/codemirror/theme')
? path.join(app.getAppPath(), './node_modules/codemirror/theme')
: require('path').resolve('./node_modules/codemirror/theme')
const themes = fs.readdirSync(themePath)
.map((themePath) => {