Visual Studio 2010 Javascript/jQuery 文档

发布于 2024-09-25 06:19:34 字数 1539 浏览 0 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

云胡 2024-10-02 06:19:34

你给出了这个例子(最好把它放在正确的问题中,也许会有一个模组来为你做这件事,因为你应该能够编辑你自己的问题)并且你想知道是否///

块可以自动插入到代码的 javascript 部分,而不仅仅是在 .cs 文件中。

(function ($) { $.fn.helpfulTips = function (options) { 
    /// <summary>  
    /// Helpful Tips 
    /// </summary>  
    /// <param name="options">options</param>  
    /// <returns>jQuery</returns>  
    var defaults = { pointer: "#theArrow" };
    } 
});

我应该认为会的,但我只是打字速度太快,以至于我没有意识到我正在打字。我也倾向于手动完成我的工作,但我通常不需要 javadoc 我的代码(我们不使用 javadoc),所以我不知道 VS 中是否有任何自动化工具可以帮助完成此任务。我很好奇,所以我一直关注这篇文章(收藏),这样我就可以看看其他人是否对此有好的想法。

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.

执妄 2024-10-02 06:19:34

添加:来引用将在源中使用的所有 js 文件

/// <reference path="jquery-1.4.2.min.js" />
/// <reference path="facebox.js" />

您必须通过在 javascript 文件顶部 。这样,你就可以在 javascript 中获得智能感知。

最后一件事,一些 js 框架(例如 jQuery)有一个用于智能感知的 -vsdoc.js 文件。您必须将该文件放置在原始 js 文件所在的位置;并且它们的名称必须匹配。

如果你的js文件名为“test.js”,那么你的-vsdoc文件必须命名为:“test-vsdoc.js”

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"

巾帼英雄 2024-10-02 06:19:34

您可以使用 YuiDoc 生成类似 JavaDoc 的输出。我已经使用过它并且对它提供的输出非常满意。您需要使用它们的注释格式,该格式与 Visual Studio 格式不同。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文