1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 17:56:25 +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

@@ -21,10 +21,15 @@ function resolveStorageNotes (storage) {
return /\.cson$/.test(notePath)
})
.map(function parseCSONFile (notePath) {
let data = CSON.readFileSync(path.join(notesDirPath, notePath))
data.key = path.basename(notePath, '.cson')
data.storage = storage.key
return data
try {
let data = CSON.readFileSync(path.join(notesDirPath, notePath))
data.key = path.basename(notePath, '.cson')
data.storage = storage.key
return data
} catch (err) {
console.error(notePath)
throw err
}
})
return Promise.resolve(notes)