Possible error in future run if generatePulse() fails after folder creation
foldersToCreate = [
@pulseDirectory,
@pulseConfigDirectory,
@pulseSyncDirectory
]
# Create the folders
Promise
.each(foldersToCreate, (folderToCreate) =>
fs.mkdirAsync(folderToCreate)
.then =>
console.log "ℹ️ Made folder: #{folderToCreate}"
)
Test + confirm. Then add an fs.existsAsync call before to ignore files that might already exist to allow generation to continue on future runs.
https://source.ind.ie/project/pulse-node/blob/master/index.coffee#L686