-
Notifications
You must be signed in to change notification settings - Fork 59
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
feat(docs): add flag for building markdown docs #173
Conversation
Codecov Report
@@ Coverage Diff @@
## master #173 +/- ##
=======================================
Coverage 77.77% 77.77%
=======================================
Files 6 6
Lines 135 135
=======================================
Hits 105 105
Misses 30 30 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @lgierth
It would be nice to make the flags not either or though. Maybe we could have a format
flag which is by default set to html
but is an array so you have all three options
--format html
--format md
--format html,md
cmds/docs.js
Outdated
@@ -11,6 +11,11 @@ module.exports = { | |||
alias: 'p', | |||
describe: 'Publish to GitHub Pages', | |||
default: false | |||
}, | |||
markdown: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This flag should also be present on the release
command, as it generates docs as well.
src/docs/build.js
Outdated
const docsPath = utils.getPathToDocs() | ||
return fs.ensureDir(docsPath) | ||
.then(() => { | ||
fs.writeFileSync(docsPath + '/index.md', output) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use path.join(docsPath, 'index.md')
to ensure the path is usable on all oses
Hope I addressed all your points -- my JS is a bit rusty :) Renamed the flag to I didn't figure out how to test |
I'm gonna call the windows node8 failure unrelated: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks LGTM
Look what I made \o/
This is for ipfs-inactive/docs#43