We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question 开发者_运维问答OKay, TWO questions here:
- Is there anything like GhostDoc for JS?
- Are there any good help file generators that can use both C# AND JS source files to generate documentation? It looks like SandCastle doesn't support a web site as opposed to a web project with .proj files. And, as far as I can tell, Natural Docs doesn't support the Visual Studio style documentation... so that won't work.
I feel like I'm missing something here. I just can't believe that people out there are commenting their JS by hand... there HAS to be something, right?
I've searched high and low. I'm asking as a last resort. Please just tell me that I stink at searching and that there are easy solutions to this! :-)
You gave this as an example (would've been nice to put it in the question proper, maybe a mod will come by and do that for you, since you should be able to edit your own questions) and you want to know if the /// <summary>
block can be automatically inserted in the javascript part of the code, not just in the .cs files.
(function ($) { $.fn.helpfulTips = function (options) {
/// <summary>
/// Helpful Tips
/// </summary>
/// <param name="options">options</param>
/// <returns>jQuery</returns>
var defaults = { pointer: "#theArrow" };
}
});
I should think it would, but I just type that stuff so fast that I don't realize I'm typing it. I tend to do mine manually too, but I don't generally have a need to javadoc my code (we don't use javadocs), so I don't know if there are any automated tools to help with that in VS. I was curious so I'm hanging onto this post (favorited) so I can see if anyone else has good thoughts on this.
You must reference all the js files will be used in the source by adding:
/// <reference path="jquery-1.4.2.min.js" />
/// <reference path="facebox.js" />
top of your javascript file. This way, you can get intellisense in javascript.
One last thing, some js frameworks (eg. jQuery) have a -vsdoc.js file for intellisense. You must place that files where your original js files resides in; and names of them must be match.
if your js files name is "test.js" then your -vsdoc file must be named: "test-vsdoc.js"
You can use YuiDoc to generate a JavaDoc like output. I've used it and was very please with the output it provides. You need to use their format for comments which is not the same as the Visual Studio format.
Is there anything on this list of use to you: https://stackoverflow.com/questions/1221413/what-tools-are-available-for-documenting-javascript ?
精彩评论