7

我有一个基于Backbone 样板的项目,我想用最近的 jdoc-toolkit记录它

虽然除了空的 _global 类我不能让它生成任何东西

代码示例:

/**
 * This is a root model for DLClass
 * @module models/DLClass
 */
define([
    'underscore',
    'backbone'
], /** @lends DLClass */ function (_, Backbone) {        
    /**
     * This is a root model for DLClass
     * @class DLClass
     * @constructor
     * @return Session Object
     */
    var DLModel = Backbone.Model.extend({
        /** @lends DLClass.prototype */

    /**
     * Generic tap event
     * @param touchEvent
     */
    onTap: function (touchEvent) {

    },
4

1 回答 1

3

尝试添加@namespace让 JSDoc 知道查看模块的内容。并使用 . 定义您的模块及其功能@name

/** 
 * This is a root model for DLClass
 * @module models/DLClass
 * @namespace
 */
define([
    'underscore',
    'backbone'
], /** @lends DLClass */ function (_, Backbone) {        
    /**
     * This is a root model for DLClass
     * @class DLClass
     * @module models/DLClass
     * @name DLClass
     * @constructor
     * @return Session Object
     */
    var DLModel = Backbone.Model.extend({
        /** @lends DLClass.prototype */

        /**
         * Generic tap event
         * @name DLClass.onTap
         * @function
         * @param touchEvent
         */
        onTap: function (touchEvent) {

        },
于 2013-05-10T18:28:43.623 回答