[autodocs] add doc blocks to more things

This commit is contained in:
Spencer Ahrens 2015-09-03 11:52:55 -07:00
parent be6a3dcb75
commit dfdef9a02a
2 changed files with 5 additions and 1 deletions

View File

@ -423,7 +423,8 @@ function getClassData(node, state, source, commentsForFile, linesForFile) {
}); });
var data = { var data = {
name: node.id.name, name: node.id.name,
methods: methods docblock: getDocBlock(node, commentsForFile, linesForFile),
methods: methods,
}; };
if (node.superClass && node.superClass.type === Syntax.Identifier) { if (node.superClass && node.superClass.type === Syntax.Identifier) {
data.superClass = node.superClass.name; data.superClass = node.superClass.name;

View File

@ -328,6 +328,9 @@ var APIDoc = React.createClass({
class {cls.name} class {cls.name}
</Header> </Header>
<ul> <ul>
{cls.docblock && <Marked>
{this.removeCommentsFromDocblock(cls.docblock)}
</Marked>}
{this.renderMethods(cls.methods)} {this.renderMethods(cls.methods)}
{this.renderProperties(cls.properties)} {this.renderProperties(cls.properties)}
</ul> </ul>