throw error if notes dir has not been created yet
This commit is contained in:
parent
324f120312
commit
3e692b65fe
@ -36,6 +36,8 @@ export const Node = {
|
||||
},
|
||||
|
||||
getMarkdownFolder: function() {
|
||||
return path.join(process.cwd(), 'posts')
|
||||
const notesDir = path.join(process.cwd(), 'notes')
|
||||
if (!Node.isFile(notesDir)) throw new Error("The notes directory has not been created yet")
|
||||
return notesDir
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user