javascript - 在 Visual Studio 中为 JavaScript 生成 javadoc

标签 javascript visual-studio visual-studio-2013 javadoc

我需要为 JavaScript 项目生成文档,并且我想使用 Javadoc 来完成。

不幸的是,我必须在 Visual Studio 2013 上执行此操作,而且看起来没有任何东西可以帮助 Javadoc 注释 block 。我至少希望当我这样做时: /** + enter 生成:

/**
 *
 */

我在 Stackoverflow 和 Microsoft 网站上寻找过插件或类似问题,但我只找到了 Doxygen 的插件或解决方案。

我真的在寻找不存在的东西吗,还是我错过了一些东西? (希望如此)

最佳答案

对于 Visual Studio,您可以使用 DocStubsJs , Visual Studio 2012+ 的扩展,用于在 JavaScript 和 TypeScript 编辑器中自动生成 JSDoc 和 VSDoc 的文档注释 stub 。

源代码位于 GitHub

引自 GitHub 自述文件:

DocStubsJs is a fairly straight-forward plugin that uses events and string parsing to determine when and how to insert a document stub. It essentially just watches key-strokes for the identifying documentation comment bock initializers. ("///" for VSDoc, and "/**" for JSDoc) Once it has determined that these have been entered on an empty line, then it parses the lines surrounding it to determine whether to add a new comment line, create a documentation comment stub, or do nothing.

注意:

对于JSDoc在函数头上方的行中键入“/**”后,将添加注释、参数标签以及返回标签。 (Web Essentials 用户请注意:您可能必须在 Web Essentials 的 JavaScript 选项中禁用自动完成多行注释才能使其正常工作。)

关于javascript - 在 Visual Studio 中为 JavaScript 生成 javadoc,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29675002/

相关文章:

javascript - javascript 中的模板文字

javascript - getElementById selected 不能选择多个选项

c# - MonoDevelop 解决方案文件和 Visual Studio 解决方案文件有什么区别?

c++ - 我不能在调试时使用 "empty space"字符作为目标路径吗?

c# - 为什么从 WCF 服务生成的引用在项目之间不同?

javascript - Mac 中的 Capslock 不会触发 keyDown 事件

javascript - 试图理解两个简短的 JavaScript 函数中的作用域

.net - 错误 MSB3147 : Could not find required file 'setup.bin' Publish to Local FAILURE

c - 在纯 C 中构建 Visual Studio 2013 项目

visual-studio-2013 - Imagination PowerVR SDK 示例无法在 Visual Studio 2013 上执行