Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

export folder as md or text #1147

Merged
merged 3 commits into from
Jan 3, 2018
Merged

export folder as md or text #1147

merged 3 commits into from
Jan 3, 2018

Conversation

mslourens
Copy link
Contributor

implemented #1122

@kazup01
Copy link
Member

kazup01 commented Nov 20, 2017

Hi @mslourens , thanks for your contribution! Could you fix CI error?

@kazup01 kazup01 added the awaiting changes 🖊️ Pull request has been reviewed, but contributor needs to make changes. label Nov 20, 2017
@mslourens
Copy link
Contributor Author

two tests are still failing (one of them is mine), but I don't know why, because on my local machine they both pass (both on Ubuntu and Windows 10).

@kazup01
Copy link
Member

kazup01 commented Dec 5, 2017

Hi @mslourens , sorry for long absence!
Could you fix conflict?

@mslourens
Copy link
Contributor Author

@kazup01 no problem, I fixed the conflicts

@@ -10,6 +10,7 @@ import dataApi from 'browser/main/lib/dataApi'
import StorageItemChild from 'browser/components/StorageItem'
import eventEmitter from 'browser/main/lib/eventEmitter'
import _ from 'lodash'
const path = require('path')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use import.

label: 'Unlink Storage',
click: (e) => this.handleUnlinkStorageClick(e)
}))
let menu = Menu.buildFromTemplate([
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use const

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw, using Menu.buildFromTemplate is so nice :)

* exportDir: String
* }
* ```
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you for your jsdoc 🙏

const resolveStorageData = require('./resolveStorageData')
const resolveStorageNotes = require('./resolveStorageNotes')
const path = require('path')
const fs = require('fs')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use import

.forEach(snippet => {
const notePath = path.join(exportDir, `${snippet.title}.${fileType}`)
console.log(notePath)
fs.writeFile(notePath, snippet.content, (err) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will work as an async function
please handle it or use fs.writeFileSync

})
}

module.exports = exportFolder
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use export default

@mslourens
Copy link
Contributor Author

I fixed most of the review comments, except the last one: if I use export default the index.js in the dataApi folder, where this file is required, will fail, because it won't load the correct file. Or do I something wrong?

@kazup01 kazup01 self-requested a review January 3, 2018 18:50
Copy link
Member

@kazup01 kazup01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kazup01 kazup01 merged commit 767a203 into BoostIO:master Jan 3, 2018
@kazup01
Copy link
Member

kazup01 commented Jan 3, 2018

Merged. Thanks @mslourens ! I will fix CI error soon.

@kazup01 kazup01 added next release (v0.8.20) and removed awaiting changes 🖊️ Pull request has been reviewed, but contributor needs to make changes. Next Release labels Jan 3, 2018
kazup01 pushed a commit that referenced this pull request Jan 3, 2018
kazup01 added a commit that referenced this pull request Jan 3, 2018
@kazup01 kazup01 mentioned this pull request Jan 3, 2018
@Rokt33r Rokt33r mentioned this pull request Jan 13, 2018
@mslourens mslourens deleted the export-folder branch January 17, 2018 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants