/
githubmr
/
facebook-react-native
Обзор
Документация
Войти
/
githubmr
/
facebook-react-native
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
main
packages/react-native/scripts/featureflags/generateCommonCxxModules.js
53 строки
3 KB
Jorge Cabiedes Acosta
Add prerelease staging API for iOS (#49650)
03 мар 2025, 20:52
03 мар 2025, 20:52
df282a0
Код
Авторство
О чём код?
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow strict * @format */ import type {GeneratorConfig, GeneratorResult} from './types'; import ReactNativeFeatureFlagsCPP from './templates/common-cxx/ReactNativeFeatureFlags.cpp-template'; import ReactNativeFeatureFlagsH from './templates/common-cxx/ReactNativeFeatureFlags.h-template'; import ReactNativeFeatureFlagsAccessorCPP from './templates/common-cxx/ReactNativeFeatureFlagsAccessor.cpp-template'; import ReactNativeFeatureFlagsAccessorH from './templates/common-cxx/ReactNativeFeatureFlagsAccessor.h-template'; import ReactNativeFeatureFlagsDefaultsH from './templates/common-cxx/ReactNativeFeatureFlagsDefaults.h-template'; import ReactNativeFeatureFlagsDynamicProviderH from './templates/common-cxx/ReactNativeFeatureFlagsDynamicProvider.h-template'; import ReactNativeFeatureFlagsOverrides from './templates/common-cxx/ReactNativeFeatureFlagsOverridesOSS_Stage_.h-template'; import ReactNativeFeatureFlagsProviderH from './templates/common-cxx/ReactNativeFeatureFlagsProvider.h-template'; import path from 'path'; export default function generateCommonCxxModules( generatorConfig: GeneratorConfig, ): GeneratorResult { const {commonCxxPath, featureFlagDefinitions} = generatorConfig; return { [path.join(commonCxxPath, 'ReactNativeFeatureFlags.h')]: ReactNativeFeatureFlagsH(featureFlagDefinitions), [path.join(commonCxxPath, 'ReactNativeFeatureFlags.cpp')]: ReactNativeFeatureFlagsCPP(featureFlagDefinitions), [path.join(commonCxxPath, 'ReactNativeFeatureFlagsAccessor.h')]: ReactNativeFeatureFlagsAccessorH(featureFlagDefinitions), [path.join(commonCxxPath, 'ReactNativeFeatureFlagsAccessor.cpp')]: ReactNativeFeatureFlagsAccessorCPP(featureFlagDefinitions), [path.join(commonCxxPath, 'ReactNativeFeatureFlagsDefaults.h')]: ReactNativeFeatureFlagsDefaultsH(featureFlagDefinitions), [path.join( commonCxxPath, 'ReactNativeFeatureFlagsOverridesOSSExperimental.h', )]: ReactNativeFeatureFlagsOverrides( featureFlagDefinitions, 'experimental', ), [path.join(commonCxxPath, 'ReactNativeFeatureFlagsOverridesOSSCanary.h')]: ReactNativeFeatureFlagsOverrides(featureFlagDefinitions, 'canary'), [path.join(commonCxxPath, 'ReactNativeFeatureFlagsProvider.h')]: ReactNativeFeatureFlagsProviderH(featureFlagDefinitions), [path.join(commonCxxPath, 'ReactNativeFeatureFlagsDynamicProvider.h')]: ReactNativeFeatureFlagsDynamicProviderH(featureFlagDefinitions), }; }