Skip to content

Commit

Permalink
Remove the deprecated transform propTypes
Browse files Browse the repository at this point in the history
  • Loading branch information
Brent Vatne committed May 7, 2015
1 parent 2f97551 commit 731d4a0
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions website/server/extractDocs.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ function renderComponent(filepath) {
docgenHelpers.findExportedOrFirst,
docgen.defaultHandlers.concat(docgenHelpers.stylePropTypeHandler)
);

return componentsToMarkdown('component', json, filepath, n++, styleDocs);
}

Expand All @@ -105,6 +106,17 @@ function renderStyle(filepath) {
docgenHelpers.findExportedObject,
[docgen.handlers.propTypeHandler]
);

// Remove deprecated style props
if (filepath === "../Libraries/StyleSheet/TransformPropTypes.js") {
['rotation', 'scaleX', 'scaleY', 'translateX', 'translateY'].forEach(function(key) {
delete json['props'][key];
});
}


// console.log(json);

return componentsToMarkdown('style', json, filepath, n++);
}

Expand Down Expand Up @@ -174,13 +186,6 @@ var styleDocs = styles.slice(2).reduce(function(docs, filepath) {
[docgen.handlers.propTypeHandler]
);

// Remove deprecated style props
if (docs['TransformPropTypes']) {
['rotation', 'scaleX', 'scaleY', 'translateX', 'translateY'].forEach(function(key) {
delete docs['TransformPropTypes']['props'][key];
});
}

return docs;
}, {});

Expand Down

0 comments on commit 731d4a0

Please sign in to comment.