mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Support excluding multiple platforms.
Summary: Currently the schema only allows to exclude a single platform (iOS OR Android). There are cases where we need to exclude multiple. This change converts the previous `excludePlatform` string property into an `excludePlatforms` array. Changelog: [Internal][Changed] - Added support to exclude multiple platforms in Codegen. Reviewed By: sammy-SC Differential Revision: D21426950 fbshipit-source-id: eff36ffa207109274794b4b300bf6313f8286161
This commit is contained in:
committed by
Facebook GitHub Bot
parent
7bb1c4e1b8
commit
16ea9ba813
+4
-1
@@ -221,7 +221,10 @@ module.exports = {
|
||||
return Object.keys(components)
|
||||
.filter(componentName => {
|
||||
const component = components[componentName];
|
||||
return component.excludedPlatform !== 'android';
|
||||
return !(
|
||||
component.excludedPlatforms &&
|
||||
component.excludedPlatforms.includes('android')
|
||||
);
|
||||
})
|
||||
.forEach(componentName => {
|
||||
const component = components[componentName];
|
||||
|
||||
Reference in New Issue
Block a user