mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Update component generators to follow new ComponentSchema
Summary: NOTE: Flow and Jest won't pass on this diff. Sandcastle, should, however, be green on D24236405 (i.e: the tip of this stack). ## Changes Previously, the "Module" schema could either contain a `components` property, or a `nativeModules` property. The existence of the `components` property was used to determine (1) if the generators would run and (2) filter schemas on which the generators would run. Now, we simply check whether the type of the "Module" schema is `Component`. Changelog: [Internal] (Note: this ignores all push blocking failures!) Reviewed By: PeteTheHeat Differential Revision: D24236508 fbshipit-source-id: 68cb3f25178b6757c9a4aee767bb6173db4932a6
This commit is contained in:
committed by
Facebook GitHub Bot
parent
a5a12cffeb
commit
100c0528f3
+7
-1
@@ -212,7 +212,13 @@ module.exports = {
|
||||
): FilesOutput {
|
||||
const files = new Map();
|
||||
Object.keys(schema.modules).forEach(moduleName => {
|
||||
const components = schema.modules[moduleName].components;
|
||||
const module = schema.modules[moduleName];
|
||||
if (module.type !== 'Component') {
|
||||
return;
|
||||
}
|
||||
|
||||
const {components} = module;
|
||||
|
||||
// No components in this module
|
||||
if (components == null) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user