admin管理员组文章数量:1402024
I am not that good at puters but am trying to use JSDoc for one of my projects,
The tutorial to get it up and running is here
.html
I have downloaded the program from github, but now do not understand what I have to do. I have a bunch of files in a folder and dont know how to get it actually running for my project.
Could someone please give me a step by step instruction on how to actually get JSDoc working, how do I set it up, how do I use it etc.
I know this may be mundane to some of you, but hey we all gotta start somewhere right?
I am not that good at puters but am trying to use JSDoc for one of my projects,
The tutorial to get it up and running is here
http://usejsdoc/about-jsdoc3.html
I have downloaded the program from github, but now do not understand what I have to do. I have a bunch of files in a folder and dont know how to get it actually running for my project.
Could someone please give me a step by step instruction on how to actually get JSDoc working, how do I set it up, how do I use it etc.
I know this may be mundane to some of you, but hey we all gotta start somewhere right?
Share Improve this question asked Jun 22, 2013 at 10:55 user2251919user2251919 6752 gold badges11 silver badges23 bronze badges2 Answers
Reset to default 6Well, are you using windows or GNU/Linux? First, you have to follow the default tags to markup your source code, identifying your classes, methods, parameters, etc... After that, you download the file here: https://github./jsdoc3/jsdoc Extract it and then go to folder jsdoc-master.
Inside it, you have a script called jsdoc (with no extension). Only you have to do is execute it pointing the whole path to your .js file you want to create a documentation like this: ./jsdoc your_class.js Then, in a couple minutes you'll have the output inside the 'out' folder. Open the .html file and bang! You have your documentation working pretty good.
Right here you can find some mon tags to use in your code (as ments): http://usejsdoc/
This solution is for Unix based system. But, there is another one using nodejs (that you can run with windows, Linux, mac, etc...). First, download the nodejs here: http://nodejs/
Then go to this website to take a look at the package jsdoc: https://npmjs/
Then, go back to your terminal (in any operating system after installed node) and type: npm install -g jsdoc The option -g means globally, so you have inside the main folder of your node packages and they are available for whatever project you have and you don't need to install it again and again...
Finally, you can just use this mand: jsdoc path/to/your/file.js
And that's it! I hope it helps you.
Once you've extracted the file you downloaded off of github, navigate within the folder and run in a terminal:
./jsdoc
with the options you want.
If you want to display the help menu
./jsdoc --help
If you want to install the program on your system, assuming a mac or linux machine, use root user or sudo
:
npm install --save -g [~/Downloads/jsdoc-3.2.2 or your path to the downloaded extracted files]
本文标签: javascriptJSDoc setting upStack Overflow
版权声明:本文标题:javascript - JSDoc setting up? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744346272a2601778.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论