【发布时间】:2021-06-24 23:49:50
【问题描述】:
我有一个 VUE.JS 应用程序,我们需要记录它,对于 .VUE 组件,我们决定使用 Vuese,但问题出在常规 JS 文件,例如模块等,我们决定使用 JsDoc 我安装了它,一切都很好,但是当我生成 JsDoc 的 HTML 文件时,它会呈现整个代码而不是我的注释行
这是一个例子
/** This is a description of the foo function. */
function myfunction() {
alert('hello world');
}
console.log(myfunction);
我明白了
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Source: test.js</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Source: test.js</h1>
<section>
<article>
<pre class="prettyprint source linenums"><code>/** This is a description of the foo function */
function myfunction() {
alert('hello world');
}
console.log(myfunction);
</code></pre>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#myfunction">myfunction</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.7</a> on Thu Jun 24 2021 14:28:24 GMT-0300 (hora estándar de Argentina)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>
可能是什么?还是我做错了什么?
注意:我安装了 JsDoc global,我尝试使用我的 jsdocrc.json 并单独使用命令 jsdoc -(PathOfMyJsFile)
TLTR : 基本上它是渲染整个代码而不是我的 JsDoc 注释
【问题讨论】:
-
评论看起来不像是jsdoc格式? jsdoc.app/tags-description.html
-
很抱歉回答晚了,但是是的,它的格式不正确,谢谢!
标签: javascript vue.js render documentation jsdoc