【问题标题】:YUIDocs parse Polymer elementYUIDocs 解析 Polymer 元素
【发布时间】:2015-03-15 17:22:11
【问题描述】:

我正在尝试记录一系列 Polymer Web 组件。我过去使用过Polymer/core-docs-viewer,但发现它不像 YUIDocs 或其他类似 JSDocs 的那样完整和可扩展。 YUIDocs 似乎是记录大型项目/前端和后端代码以创建单个可维护文档源的更好选择。

有没有办法让 YUIDocs 解析 HTML 注释块内或自定义元素的 <script> 标记内的脚本块?

我试过了:

<!--
/**
* Description
*
*@class kiosk-pager
*@constructor
*/
-->

<polymer-element name="kiosk-pager" attributes="settings pagingRate pageDelay pollRate autoPaging "> //etc

还有:

<polymer-element name="kiosk-pager" attributes="settings pagingRate pageDelay pollRate autoPaging ">
//template
<script>
    /**
    * Description
    *
    *@class kiosk-pager
    *@constructor
    */

到目前为止,YUIDocs 还没有在上面的 cmets 中找到并添加我的类声明。

感谢任何帮助。

【问题讨论】:

    标签: javascript documentation polymer yuidoc


    【解决方案1】:

    这是我如何将它与 Polymer 一起使用的示例

    <script>
    /**
        Description of element
    
            <myelement>I am a sweet custom element</myelement>
    
        @class myelement
    **/
    /**
        A description of a property
    
        @attribute property name
    **/
    </script>
    
    <dom-module id="myelement">
        Put all of your element's code here
    </dom-module>
    
    <script src="./i_keep_the_js_seperate.js"></script>
    

    【讨论】:

      【解决方案2】:

      有一个相关的问题。欢迎提出您的想法。

      https://github.com/yui/yuidoc/issues/328

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2014-10-31
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2015-11-14
        • 1970-01-01
        相关资源
        最近更新 更多