Files
react-native/scripts/consts.js
T
Alex Hunt 80ec096e7c Create shared consts module for scripts
Summary:
Tidy up, removes risk of breakage when relocating inner modules.

Changelog: [Internal]

Reviewed By: lunaleaps

Differential Revision: D53813025

fbshipit-source-id: 43dc4a57191363546d6858cff311e260d416192f
2024-02-16 03:21:25 -08:00

45 lines
987 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
* @format
* @oncall react_native
*/
const path = require('path');
/**
* The absolute path to the repo root.
*/
const REPO_ROOT /*: string */ = path.resolve(__dirname, '..');
/**
* The absolute path to the packages directory (note: this directory alone may
* not match the "workspaces" config in package.json).
*/
const PACKAGES_DIR /*: string */ = path.join(REPO_ROOT, 'packages');
/**
* The absolute path to the repo scripts directory.
*/
const SCRIPTS_DIR /*: string */ = path.join(REPO_ROOT, 'scripts');
/**
* The absolute path to the react-native package.
*/
const REACT_NATIVE_PACKAGE_DIR /*: string */ = path.join(
REPO_ROOT,
'packages',
'react-native',
);
module.exports = {
PACKAGES_DIR,
REACT_NATIVE_PACKAGE_DIR,
REPO_ROOT,
SCRIPTS_DIR,
};