Skip to content

Commit 19f062d

Browse files
committed
Merge pull request facebook#2540 from sahrens/animatedDocGen
[autodocs] add doc blocks to more things
2 parents 293d292 + dfdef9a commit 19f062d

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

website/jsdocs/jsdocs.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,8 @@ function getClassData(node, state, source, commentsForFile, linesForFile) {
423423
});
424424
var data = {
425425
name: node.id.name,
426-
methods: methods
426+
docblock: getDocBlock(node, commentsForFile, linesForFile),
427+
methods: methods,
427428
};
428429
if (node.superClass && node.superClass.type === Syntax.Identifier) {
429430
data.superClass = node.superClass.name;

website/layout/AutodocsLayout.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,9 @@ var APIDoc = React.createClass({
328328
class {cls.name}
329329
</Header>
330330
<ul>
331+
{cls.docblock && <Marked>
332+
{this.removeCommentsFromDocblock(cls.docblock)}
333+
</Marked>}
331334
{this.renderMethods(cls.methods)}
332335
{this.renderProperties(cls.properties)}
333336
</ul>

0 commit comments

Comments
 (0)