2015-01-07 2 views
0

YUIDoc 내 네임 스페이스에 대한 문서를 생성하지 않는 것 같습니다. 이 프로젝트는yuidoc을 사용하여 네임 스페이스를 문서화하는 방법은 무엇입니까?

/* 
* Example namespace. 
* 
* @namespace MY_NAMESPACE 
*/ 
var MY_NAMESPACE = (function() { 
    /** 
    * @property privateProperty1 
    * @type {Number} 
    * @private 
    */ 
    var privateProperty1 = 1; 

    /** 
    * Logs the method name to the console. 
    * @method privateMethod1 
    * @private 
    */ 
    var privateMethod1 = function() { 
    console.log('In privateMethod1'); 
    }; 

    return { 
    /** 
    * @property publicProperty1 
    * @type {Number} 
    */ 
    publicProperty1: 2, 

    /** 
    * Logs a simple message to the console. 
    * 
    * @method publicMethod1 
    * @param {String} aString A string to log. 
    */ 
    publicMethod1: function(aString) { 
     console.log('In publicMethod1 and was passed: ' + aString); 
    } 
    } 
})(); 

답변

0

@namespace는 다음과 같이 @namespace을 사용하려는 경우에는 @class을 포함해야하지만, 당신이 @class 대신 @namespace의를 사용할 수 Revealing Module 디자인 패턴을 사용합니다.

/** 
* Example namespace. 
* @namespace MY_NAMESPACE 
*/ 

/** 
* Example class. 
* @class MyClass 
*/ 
관련 문제