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

use codemirror

This commit is contained in:
Dick Choi
2016-10-03 22:28:13 +09:00
parent 041232fbdd
commit 90b490c28b
17 changed files with 217 additions and 1079 deletions

View File

@@ -1,3 +1,16 @@
const path = require('path')
const fs = require('sander')
const { remote } = require('electron')
const { app } = remote
const themePath = process.env.NODE_ENV === 'production'
? path.join(app.getAppPath(), './node_modules/codemirror/theme')
: require('path').resolve('./node_modules/codemirror/theme')
const themes = fs.readdirSync(themePath)
.map((themePath) => {
return themePath.substring(0, themePath.lastIndexOf('.'))
})
const consts = {
FOLDER_COLORS: [
'#E10051',
@@ -16,7 +29,8 @@ const consts = {
'Turquoise',
'Dodger Blue',
'Violet Eggplant'
]
],
THEMES: themes
}
module.exports = consts