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

feat(docs): add flag for building markdown docs #173

Merged
merged 1 commit into from
Nov 21, 2017
Merged

Conversation

ghost
Copy link

@ghost ghost commented Nov 17, 2017

Look what I made \o/

This is for ipfs-inactive/docs#43

@ghost ghost requested a review from dignifiedquire November 17, 2017 03:54
@codecov
Copy link

codecov bot commented Nov 17, 2017

Codecov Report

Merging #173 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0a847e1...d48a7a8. Read the comment docs.

@ghost ghost self-assigned this Nov 17, 2017
@ghost ghost added the status/in-progress In progress label Nov 17, 2017
@ghost ghost assigned ghost and unassigned ghost Nov 17, 2017
Copy link
Member

@dignifiedquire dignifiedquire left a 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: {
Copy link
Member

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.

const docsPath = utils.getPathToDocs()
return fs.ensureDir(docsPath)
.then(() => {
fs.writeFileSync(docsPath + '/index.md', output)
Copy link
Member

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

@ghost ghost force-pushed the feat/docs-md branch from 45a294a to e6fc4d1 Compare November 17, 2017 23:27
@ghost ghost force-pushed the feat/docs-md branch from e6fc4d1 to d48a7a8 Compare November 17, 2017 23:38
@ghost
Copy link
Author

ghost commented Nov 17, 2017

Hope I addressed all your points -- my JS is a bit rusty :)

Renamed the flag to -d because it conflicted with -f on the release command.

I didn't figure out how to test node cli.js release --docs -d html -d md without letting it touch github, but on the docs command it works, so it should be fine I guess?

@ghost
Copy link
Author

ghost commented Nov 17, 2017

I'm gonna call the windows node8 failure unrelated: Error: EPERM: operation not permitted, scandir 'C:\projects\aegir\node_modules\fsevents\node_modules'

Copy link
Member

@dignifiedquire dignifiedquire left a comment

Choose a reason for hiding this comment

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

thanks LGTM

@dignifiedquire dignifiedquire merged commit 456858f into master Nov 21, 2017
@dignifiedquire dignifiedquire deleted the feat/docs-md branch November 21, 2017 21:24
@ghost ghost removed the status/in-progress In progress label Nov 21, 2017
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.

1 participant