Remove the deprecated transform propTypes

This commit is contained in:
Brent Vatne 2015-05-07 12:50:41 -07:00
parent 2f975516cf
commit 731d4a0610
1 changed files with 12 additions and 7 deletions

View File

@ -83,6 +83,7 @@ function renderComponent(filepath) {
docgenHelpers.findExportedOrFirst,
docgen.defaultHandlers.concat(docgenHelpers.stylePropTypeHandler)
);
return componentsToMarkdown('component', json, filepath, n++, styleDocs);
}
@ -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++);
}
@ -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;
}, {});