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:
Ramanpreet Nara
2020-10-15 22:53:55 -07:00
committed by Facebook GitHub Bot
parent a5a12cffeb
commit 100c0528f3
12 changed files with 73 additions and 16 deletions
@@ -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;