Skip to content

Commit

Permalink
Update auto gen docs
Browse files Browse the repository at this point in the history
* docgen -> v2.0.1 to support ES6 classes.
* Add `<Modal>` and `<ProgressViewIOS>` components to docs.
  • Loading branch information
sahrens committed Aug 31, 2015
1 parent 34c74ea commit 51b1f39
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"mkdirp": "latest",
"optimist": "0.6.0",
"react": "~0.12.0",
"react-docgen": "^1.1.0",
"react-docgen": "^2.0.1",
"react-page-middleware": "git://github.com/facebook/react-page-middleware.git",
"request": "latest"
}
Expand Down
6 changes: 3 additions & 3 deletions website/server/docgenHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var b = require('react-docgen/node_modules/recast').types.builders;
var docgen = require('react-docgen');

function stylePropTypeHandler(documentation, path) {
var propTypesPath = docgen.utils.getPropertyValuePath(path, 'propTypes');
var propTypesPath = docgen.utils.getMemberValuePath(path, 'propTypes');
if (!propTypesPath) {
return;
}
Expand Down Expand Up @@ -36,8 +36,8 @@ function stylePropTypeHandler(documentation, path) {
}

function findExportedOrFirst(node, recast) {
return docgen.resolver.findExportedReactCreateClassCall(node, recast) ||
docgen.resolver.findAllReactCreateClassCalls(node, recast)[0];
return docgen.resolver.findExportedComponentDefinition(node, recast) ||
docgen.resolver.findAllComponentDefinitions(node, recast)[0];
}

function findExportedObject(ast, recast) {
Expand Down
2 changes: 2 additions & 0 deletions website/server/extractDocs.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,10 @@ var components = [
'../Libraries/CustomComponents/ListView/ListView.js',
'../Libraries/Components/MapView/MapView.js',
'../Libraries/CustomComponents/Navigator/Navigator.js',
'../Libraries/Modal/Modal.js',
'../Libraries/Components/Navigation/NavigatorIOS.ios.js',
'../Libraries/Picker/PickerIOS.ios.js',
'../Libraries/Components/ProgressViewIOS/ProgressViewIOS.ios.js',
'../Libraries/Components/ScrollView/ScrollView.js',
'../Libraries/Components/SegmentedControlIOS/SegmentedControlIOS.ios.js',
'../Libraries/Components/SliderIOS/SliderIOS.ios.js',
Expand Down

0 comments on commit 51b1f39

Please sign in to comment.