有点像javadocs但是对于聚合物元素。
我觉得这些都是由http://www.polymer-project.org/docs/elements/polymer-elements.html http://www.polymer-project.org/docs/elements/polymer-ui-elements.html工具生成的
如果没有你可以具体分享的工具,也许有人可以分享对方法的描述。XSLT?
发布于 2014-03-03 09:30:45
有一项关于自我记录元素的建议。
https://docs.google.com/document/d/15erfuJ9kGTTFZIxM1E8mKSdvZmb9RPr2BwMQvU48PVI
给出了几个例子。
<wc-documentation name="my-tag">
<summary>My tag is the bees knees.</summary>
</wc-documentation>
<wc-documentation name="my-tag" version="0.0.1"
github="https://github.com/Polymer/polymer"
home="http://polymer-project.org">
<summary>...</summary>
<pre class="example">...</pre>
</wc-documentation>
<wc-documentation name="my-tag">
<div class="api">
<p>This element supports the following methods:</p>
<dl public>
<dt>foo()</dt>
<dd>Awesome method.</dd>
</dl>
<dl private>
<dt>bar_()</dt>
<dd>Privacy is key.</dd>
</dl>
</div>
</wc-documentation>在这里讨论
有一些担心的数量,没有必要的锅炉板内的元素。这最终导致了文档查看器元素的原型。
http://polymer.github.io/polymer-doc-viewer/?//polymer.github.io/google-map/components/google-map/google-map.html&//polymer.github.io/polymer-localstorage/components/polymer-localstorage/polymer-localstorage.html
发布于 2014-03-03 20:09:00
我们正在清理这些东西,并在接下来的几周内记录文档工具。很抱歉,今天的情况有点不顺利。话虽如此,以下是一些信息:
聚合物销售一个polymer-doc-viewer组件,您可以指向(一个或多个) HTML文件从源注释生成文档。查看demo.html,了解一些可能的用法。
我们也有polymer-docs组件,这将呈现文档的所有聚合物元素,它知道,你已经安装。以下是安装在gh-pages上的实时版本
http://polymer.github.io/polymer-docs/components/polymer-docs/
注释格式类似于JSDoc,主要是从YUIDoc复制的。呈现的输出可能很快就会得到一个面部提升,但这是一个很好的部分:如果我们更改它,然后您更新您的组件副本,它将只是工作。
您还可以自定义或制作自己的polymer-doc-viewer,因为代码非常简单。还有一个名为context-free-parser的组件(包括),它实际上将文档数据打包成一个JavaScript对象(数据模型),这样您就可以随意地呈现它。
https://stackoverflow.com/questions/22135596
复制相似问题