Files
react-native/private/react-native-fantom/runner/paths.js
T
Rubén Norte 2016118aeb Centralize path definitions for Fantom builds and move to .out (#52829)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52829

Changelog: [internal]

Just a small refactor to move the definitions of output paths to a specific module. We'll add more to this in a latter diff.

Reviewed By: sammy-SC

Differential Revision: D78905645

fbshipit-source-id: 011e6cec13396301dad8e76400b6f2b9e13568f0
2025-08-04 05:56:51 -07:00

30 lines
843 B
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-local
* @format
*/
import path from 'path';
export const OUTPUT_PATH: string = path.resolve(__dirname, '..', '.out');
export const JS_BUILD_OUTPUT_PATH: string = path.join(OUTPUT_PATH, 'js-builds');
export const NATIVE_BUILD_OUTPUT_PATH: string = path.join(
OUTPUT_PATH,
'native-builds',
);
export function getTestBuildOutputPath(): string {
const fantomRunID = process.env.__FANTOM_RUN_ID__;
if (fantomRunID == null) {
throw new Error(
'Expected Fantom run ID to be set by global setup, but it was not (process.env.__FANTOM_RUN_ID__ is null)',
);
}
return path.join(JS_BUILD_OUTPUT_PATH, fantomRunID);
}