javascript WebStorm:如何生成 JSDoc 文档

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/21615926/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-27 21:19:12  来源:igfitidea点击:

WebStorm: How to generate JSDoc documentation

javascriptwebstormjsdoc

提问by java-pe

I just started using WebStorm and JSDoc to document my JavaScript. Still I have not found a way to generate a HTML documentation using some kind of WebStorm built-in functionality. I searched the web and Stack Overflow, but only found a lot of questions about the syntax of JSDoc, etc.

我刚开始使用 WebStorm 和 JSDoc 来记录我的 JavaScript。我仍然没有找到使用某种 WebStorm 内置功能生成 HTML 文档的方法。我在网上和Stack Overflow上搜索了一下,但只发现了很多关于JSDoc的语法等方面的问题。

What am I missing? I am using WebStorm 7.0.3.

我错过了什么?我正在使用 WebStorm 7.0.3。

采纳答案by Victoria Maksimova

Nice article about jsDocfor phpStormat this link.

此链接中有关phpStormjsDoc 的好文章。

In WebStorm I guess the same.

在 WebStorm 中,我猜也是一样。

回答by Balthazar

Since Webstormv8.0.0, you can create JSDoccomments by simply typing /**right before the methodor functiondeclaration you want to add the documentation, and then press Enter, this will generate a basic block with all your parametersalready set.

Webstorm v8.0.0 开始,您可以创建JSDoc注释,只需/**在要添加文档的methodorfunction声明之前键入,然后按Enter,这将生成一个基本块,其中包含您parameters已经设置的所有内容。

More info on this Webstormarticle.

关于这篇Webstorm文章的更多信息。

回答by Vlad

WebStorm has no built-in functionality to generate documentation. You can use external solutions for that, at least as https://github.com/jsdoc3/jsdoc

WebStorm 没有生成文档的内置功能。您可以为此使用外部解决方案,至少作为https://github.com/jsdoc3/jsdoc

I use jsduck for that: https://github.com/senchalabs/jsduck

我为此使用 jsduck:https: //github.com/senchalabs/jsduck

回答by Alberto Perez

WebStorm has a built-in function to help a little when creating JSDoc documentation in your code, they explain it in thisarticle. As far as I could look for, there's no plugin on the WebStorm plugin store to further help us creating nor rendering JSDoc documentation. For that, you would need to use external tools.

WebStorm 有一个内置函数,可以在您的代码中创建 JSDoc 文档时提供一些帮助,他们在本文中对此进行了解释。据我所知,WebStorm 插件商店中没有插件可以进一步帮助我们创建或呈现 JSDoc 文档。为此,您需要使用外部工具。