ensureLocalBuild() — react Function Reference
Architecture documentation for the ensureLocalBuild() function in build.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 719afe7b_9c41_c553_ebc8_a674272e75ad["ensureLocalBuild()"] 67a0a2e0_bd49_0c73_8f90_c9d35aa3cb60["build.js"] 719afe7b_9c41_c553_ebc8_a674272e75ad -->|defined in| 67a0a2e0_bd49_0c73_8f90_c9d35aa3cb60 b8a74eb6_bc15_fef1_125a_c2ace8297b67["main()"] b8a74eb6_bc15_fef1_125a_c2ace8297b67 -->|calls| 719afe7b_9c41_c553_ebc8_a674272e75ad style 719afe7b_9c41_c553_ebc8_a674272e75ad fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-devtools-extensions/build.js lines 20–47
const ensureLocalBuild = async () => {
const buildDir = resolve(__dirname, '..', '..', 'build');
const nodeModulesDir = join(buildDir, 'node_modules');
// TODO: remove this check whenever the CI pipeline is complete.
// See build-all-release-channels.js
const currentBuildDir = resolve(
__dirname,
'..',
'..',
'build',
'oss-experimental',
);
if (pathExistsSync(buildDir)) {
return; // all good.
}
if (pathExistsSync(currentBuildDir)) {
await ensureDir(buildDir);
await copy(currentBuildDir, nodeModulesDir);
return; // all good.
}
throw Error(
'Could not find build artifacts in repo root. See README for prerequisites.',
);
};
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does ensureLocalBuild() do?
ensureLocalBuild() is a function in the react codebase, defined in packages/react-devtools-extensions/build.js.
Where is ensureLocalBuild() defined?
ensureLocalBuild() is defined in packages/react-devtools-extensions/build.js at line 20.
What calls ensureLocalBuild()?
ensureLocalBuild() is called by 1 function(s): main.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free