mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/43395 Changelog: [internal] This moves native module specs to `specs` directory to align with the general convention. Reviewed By: cortinico Differential Revision: D54680056 fbshipit-source-id: 8b6ae6187e2ffa9120159b7d1fa25957677e0f4f
36 lines
1.4 KiB
JavaScript
36 lines
1.4 KiB
JavaScript
/**
|
|
* 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 NativeReactNativeFeatureFlagsCPP from './templates/js/NativeReactNativeFeatureFlags.cpp-template';
|
|
import NativeReactNativeFeatureFlagsH from './templates/js/NativeReactNativeFeatureFlags.h-template';
|
|
import NativeReactNativeFeatureFlagsJS from './templates/js/NativeReactNativeFeatureFlags.js-template';
|
|
import ReactNativeFeatureFlagsJS from './templates/js/ReactNativeFeatureFlags.js-template';
|
|
import path from 'path';
|
|
|
|
export default function generateCommonCxxModules(
|
|
generatorConfig: GeneratorConfig,
|
|
): GeneratorResult {
|
|
const {jsPath, commonNativeModuleCxxPath, featureFlagDefinitions} =
|
|
generatorConfig;
|
|
|
|
return {
|
|
[path.join(jsPath, 'ReactNativeFeatureFlags.js')]:
|
|
ReactNativeFeatureFlagsJS(featureFlagDefinitions),
|
|
[path.join(jsPath, 'specs', 'NativeReactNativeFeatureFlags.js')]:
|
|
NativeReactNativeFeatureFlagsJS(featureFlagDefinitions),
|
|
[path.join(commonNativeModuleCxxPath, 'NativeReactNativeFeatureFlags.h')]:
|
|
NativeReactNativeFeatureFlagsH(featureFlagDefinitions),
|
|
[path.join(commonNativeModuleCxxPath, 'NativeReactNativeFeatureFlags.cpp')]:
|
|
NativeReactNativeFeatureFlagsCPP(featureFlagDefinitions),
|
|
};
|
|
}
|