4
嗨 我想添加自定義標記到JSDoc工具箱。我發現只有有用的網站是這樣的:Using custom tags但它不起作用。JSDoc工具箱中的自定義標記
我也試過{+data.comment.getTag("customTag")[0]+}
沒有運氣。
嗨 我想添加自定義標記到JSDoc工具箱。我發現只有有用的網站是這樣的:Using custom tags但它不起作用。JSDoc工具箱中的自定義標記
我也試過{+data.comment.getTag("customTag")[0]+}
沒有運氣。
我正在使用這個@TODO標記並工作。下面是例子:
/**
* Working with cookies (set/get/delete)
* @namespace Cookies related methods
* @TODO serialize javascript object and store in cookie
*/
x.cookie = x.cookie || {};
/**
* Set cookie with name/value and expiration with one year
*
* @param {string} name
* @param {string} value
* @TODO write this method
*/
x.cookie.set = function(name, value) {
};
您可以添加第一@TODO預設模板是這樣的:
<!-- ============================== ToDo summary ======================== -->
{!
var todos = data.comment.getTag("TODO");
!}
<if test="todos.length">
<table class="summaryTable" cellspacing="0" summary="A summary of the TODOs documented in the class {+data.alias+}.">
<caption>TODO Summary</caption>
<thead>
<tr>
<th scope="col"></th>
<th scope="col">ToDo Description</th>
</tr>
</thead>
<tbody>
<for each="todo" in="todos">
<tr>
<td class="attributes">
</td>
<td class="nameDescription">
{+todo+}
</td>
</tr>
</for>
</tbody>
</table>
</if>
和第二個,每個方法:
<if test="member.comment.getTag('TODO')[0]">
todo: {+ member.comment.getTag("TODO")[0] +}
</if>
我要這個片段添加到class.tmpl?我對嗎 ? – 2012-03-20 08:23:02