-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
API documentation #4571
API documentation #4571
Conversation
Crosspost at https://groups.google.com/forum/#!topic/mozilla.dev.pdf-js/2EH6HQG_FVY Can you move all resources to the ./external/jsdoc/ folder? And as discussed in the mailing list, add a build step to create output the results in the ./build/jsdoc/. We have plans to integrate that to the buildweb step to automatically generate/publish gh-pages. |
Thanks for your answer, Yury. I have just moved the prototype of the API docs from ./out to ./external/jsdoc (I also added a line to .gitignore so that Netbeans folder is ignored by Git). Then, I commited and made a second pull request. Please, check that everything is okay. Could you give me some guidelines on how to add a build step to the buildweb step to automatically generate/publish gh-pages, please? I am using JSDoc. Here you will find more information about it: https://github.com/jsdoc3/jsdoc My idea is to design the API little by little. It won't be easy, it won't take little time but I feel I can achieve that. I just wish to contribute to the project. Thanks in advance. |
We already auto publish to gh-pages. You should add another build step to make.js (e.g target.api) and then copy that output during the target.web https://github.com/mozilla/pdf.js/blob/master/make.js#L145 step. For an example, see our new gh-pages PR #4585. |
It seems that's what I needed: a step-by-step tutorial on how to add another build step. Thanks for your answer, Brendan. |
@pablofiu, I used it couple of months ago. Yes, the https://github.com/jsdoc3/jsdoc was the best choice so far. From top of my head, there was a small defect at RenderTask, it did not add the promise field to the documentation. |
@yurydelendik : It seems JSDoc is best option but it is far from perfect. For example, it does not distinguish between functions and methods: http://usejsdoc.org/tags-method.html I have already started to analyze code in order to build the API docs. |
Based on your comments on file ./src/display/api.js, I created API docs using JSDoc. This is a Node module installed at ./node_module/jsdoc For more information, visit http://usejsdoc.org/ API docs files are located at ./external/jsdoc as Yuri asked me. #4571 (comment) Unfortunately, I am confused on how to add a build step as Brendan asked here: #4571 (comment) I do not understand step five: #4585 (comment) Feel free to give me some feedback. I have just asked a merge to master. |
I did not ask that. I just said " move all resources to the ./external/jsdoc/ folder". If you don't have resources, e.g. style, images, additional build scripts, then you don't have to have this folder. Sorry for the confusion. We are not interested in final output of the jsdoc. We are interested in automation of building of this output. Please remove final output from the ./external/jsdoc/. It shall be generated by make.js at the ./build/jsdoc folder. |
Done and pushed.
This is the part which I am struggling with. |
@pablofiu Could you squash the commits into one to make review easier? See https://github.com/mozilla/pdf.js/wiki/Squashing-Commits on how to do this easily. Regarding your Is it a bit more clear? If not, feel free to ask :) |
@@ -5,3 +5,5 @@ tags | |||
.DS_Store | |||
Makefile | |||
node_modules/ | |||
nbproject/ | |||
.project |
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.
non related changes
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.
You are right. My mistake. I am sorry.
@timvandermeij: Thanks for your detailed answer :) It seems I have commited some changes that I should not have commited. I decided to delete my documentation branch and created a new branch named 'APIDocs' (instead of squashing the commits into one). Tim, should I modify ./external/shelljs/shell.js in order to create a command for JSDoc? I see it has been done, for example, for cd and pwd commands. |
For reference, see #4616 which implements the necessary command in make.js. |
Thanks, Jonas. Isn't Fiumara, Pablo Alejandro On 13 April 2014 19:28, Jonas Jenwald [email protected] wrote:
|
Oh, I misunderstood your intent. We started contributing JSDoc comments long ago on API functions (see src/display/api.js), that has a higher priority than some classes that users are not going to deal with. And yes, you could submit documentation comments and we expect production quality comments at this time. |
No problem. I should have mentioned that I was checking if there was interest in Yury, could you have a look at this function related to JSDoc output, Is JSDoc output being put to bin folder? Isn't Fiumara, Pablo Alejandro On 14 April 2014 16:58, Yury Delendik [email protected] wrote:
|
To build the documentation, run Every time the pull request is merged, the docs are updated automatically at http://mozilla.github.io/pdf.js/api/draft/index.html |
Here's the function I wrote to generate API Docs: #4623 |
Start of pdf.js documentation. Generated with JSDoc.