문제

Is it possible to ignore various tags in yuidoc to make documentation build process messages more useful.

I've a problem with tags like @author, @date etc

/**
 * The XYZ View ... 
 * These tags yuidoc result in a yuidoc warning
 * 
 * @company <company name>
 * @date Mon Aug 27 2013 22:30:50 GMT+0200 (CEST)
 * 
 * These tags yuidoc is able to interpret
 * @author Bernhard <email@foo>
 * @module Welcome    
 * @submodule Frontend
 * @class WelcomeView
 * @constructor
 *
 */

 // Yuidoc throws warnings like
 warn: (docparser): unknown tag: company, path/to/file.js:1
 warn: (docparser): unknown tag: date, path/to/file.js:1:1

And there are tons of files which makes it impossible to find the "real" warnings" Is there a way to exlude tags in yuidoc?

도움이 되었습니까?

해결책

Based on the research I have conducted, YUIDoc provides no means to set a list of tags to ignore nor any other means to screen out these warnings.

However, what you can do is as follows:

  1. (Optional) Fork the existing YUIDoc project
  2. Edit yuidocjs/lib/docparser.js, and add the desired tags to TAGLIST:

    TAGLIST = [
        // ...
        "conditional", // conditional module
        "company",
        "config", // a config param (not an attribute, so no change events)
        // ...
        "contributor", // like author
        "date",
        "default", // property/attribute default value
        // ...
    ]
    
  3. Run YUIDoc as normal and watch as the warnings disappear!

Note that these fields won't appear in the documentation, but it seems like your primary concern is how to omit the warnings. If you do want to handle the tags, you'll need to make changes to the DIGESTERS list.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top