Add inferfaceOnly option to CodegenSchema

Summary: In some cases the implementation for native modules are more advanced and we cannot currently generate some of the files. We've decided in these cases to only generate the props + events for now, so this flag `interfaceOnly` will only generate those files 👍

Reviewed By: TheSavior

Differential Revision: D14295980

fbshipit-source-id: 1790825143206a84469015e08958bf6f00ffde52
This commit is contained in:
Rick Hanlon
2019-03-05 11:53:56 -08:00
committed by Facebook Github Bot
parent b7b8836a7f
commit f72776e8dc
14 changed files with 282 additions and 0 deletions
@@ -55,6 +55,9 @@ module.exports = {
return Object.keys(components)
.map(componentName => {
if (components[componentName].interfaceOnly === true) {
return;
}
return componentTemplate.replace(/::_CLASSNAME_::/g, componentName);
})
.join('\n');