OKay, TWO questions here:
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"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With