Skip to content

Commit

Permalink
Update docs gen
Browse files Browse the repository at this point in the history
  • Loading branch information
pieterv committed Mar 9, 2015
1 parent fc4bae4 commit c6729ed
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 1,032 deletions.
26 changes: 3 additions & 23 deletions build_helpers/buildAPIDocs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@
// -*- mode: js -*-
"use strict";

/**
* Extractor for React documentation in JavaScript.
*/
var ReactDocumentationParser = require('./react_documentation/ReactDocumentationParser');
var fs = require('fs');
var generateMarkdown = require('./react_documentation/generateMarkdown');
var path = require('path');
var fs = require('fs');
var ReactDocGen = require('react-docgen');

var PROJECT_ROOT = path.join(__dirname, '../');
var FILES_TO_READ = [
Expand All @@ -29,26 +26,9 @@ var FILES_TO_READ = [
}
];

ReactDocumentationParser.addHandler(
require('./react_documentation/propTypeHandler'),
'propTypes'
);
ReactDocumentationParser.addHandler(
require('./react_documentation/propDocBlockHandler'),
'propTypes'
);
ReactDocumentationParser.addHandler(
require('./react_documentation/defaultValueHandler'),
'getDefaultProps'
);

ReactDocumentationParser.addHandler(
require('./react_documentation/componentDocblockHandler')
);

FILES_TO_READ.forEach(function(file) {
var fileSource = fs.readFileSync(file.path);
var fileDocsData = ReactDocumentationParser.parseSource(fileSource);
var fileDocsData = ReactDocGen.parse(fileSource);
var markdownFilePath = path.join(__dirname, '../docs', file.markdownFileName);

var headerComment = '<!-- File generated from "' +
Expand Down
Loading

0 comments on commit c6729ed

Please sign in to comment.