mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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:
committed by
Facebook Github Bot
parent
b7b8836a7f
commit
f72776e8dc
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user