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
Documentation Index and subdirectories parsing #65
Conversation
vdeturckheim
commented
Sep 3, 2014
- Generates an index (with the -i option) for the documentation of functions and classes with links to detailed documentation and source file.
- The index is sorted alphabetically.
- -r option makes jsdox parse the subfolders of the directory given as argument and generates all documentation in the output folder.
- --rr option makes jsdox parse the subfolders of the directory given as argument and generates all documentation in subfolders with the parsed subfolders name. Those are created in the output folder.
Conflicts: index.md
Great work Vladimir. Thanks for the PR. We'll review soon.
|
@@ -1,3 +1,14 @@ | |||
### Notes | |||
|
|||
This repository is a fork from https://github.com/sutoiku/jsdox |
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.
We can't merge these README changes into the main repo. You'd have to add the "feature I added" section inline with the rest of the jsdox documentation.
@psq We should consider pulling documentation into the README of JSDox instead of relying on contributors to update the gh-pages branch. It's a more streamlined flow to just use the readme as the source of documentation. If you agree, then @vdeturckheim can add a new section to the readme called "Features" that looks kind of like:
### CLI Options
`-recursive` (alias: `-r`): it does this and that...`
Example:
`jsdox -r path/to/my.js`
Produces the file `path/to/my.md`
`-respect-recursive` (alias: `-rr`)...
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.
@mrjoelkemp, yes, that's fine. Although we'll keep the gh-pages, but will be behind till someone (I) update it.
@vdeturckheim Can you revert all spacing changes please? It's hard to see what's an actual change. Feel free to ping me when that's done and I'll continue reviewing. Thanks in advance. |
agree with @mrjoelkemp, but no need to keep creating new PRs, just keep pushing into your branch, and github will pick it up as additional commits for this PR. |
@psq @mrjoelkemp |
@mrjoelkemp : Indent problems should be fixed. |
@@ -4,6 +4,31 @@ jsdox is a simple jsdoc 3 generator. It pulls documentation tags based on a sub | |||
|
|||
Relies on the [JSDoc3 parser](https://github.com/mrjoelkemp/jsdoc3-parser) to get the full AST including comments. | |||
|
|||
### CLI Options |
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 looks much better. Thank you.
overall looks good to me, played with it and worked for me. might be good to add the command to use to generate the sample output to the For the records, I was using:
any one else, comments? |
I'm unable to continue reviewing until tomorrow night. I had a few things to comment on, so let's hold off on cutting a release until I can make some minor edits. @pq feel free to merge if you're okay with the PR |
will merge, but won't make a new release till I hear from you. I have a few minor edits I'd like to do as well (mostly stylistic changes, though). |
Documentation Index and subdirectories parsing. Thank you @vdeturckheim.
@@ -114,6 +150,28 @@ function generateForDir(filename, destination, templateDir, cb, fileCb) { | |||
var data = analyze(result, argv), | |||
output = generateMD(data, templateDir); | |||
|
|||
|
|||
if(argv.index) { | |||
for (var i = 0; i < data.functions.length; i++) { |
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.
Would love for all of this logic to be abstracted into a separate module to keep jsdox.js as clean as possible. It also makes it easier to unit test that module in isolation.