main() — react Function Reference
Architecture documentation for the main() function in build-and-test.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 5fee8731_b60a_55eb_a4e0_95679d86d20d["main()"] 21cad21f_644b_d18d_0ebc_7082529ded32["build-and-test.js"] 5fee8731_b60a_55eb_a4e0_95679d86d20d -->|defined in| 21cad21f_644b_d18d_0ebc_7082529ded32 03a04714_b072_4870_dd16_870fb5104fd7["archiveGitRevision()"] 5fee8731_b60a_55eb_a4e0_95679d86d20d -->|calls| 03a04714_b072_4870_dd16_870fb5104fd7 3ee95b5a_aca3_bd13_eaed_7eeb122fde84["downloadLatestReactBuild()"] 5fee8731_b60a_55eb_a4e0_95679d86d20d -->|calls| 3ee95b5a_aca3_bd13_eaed_7eeb122fde84 690c4a3f_d501_fbe6_d197_049a13135ae7["buildAndTestInlinePackage()"] 5fee8731_b60a_55eb_a4e0_95679d86d20d -->|calls| 690c4a3f_d501_fbe6_d197_049a13135ae7 79f8e072_f2d2_4252_a044_b17f4cfad24b["buildAndTestStandalonePackage()"] 5fee8731_b60a_55eb_a4e0_95679d86d20d -->|calls| 79f8e072_f2d2_4252_a044_b17f4cfad24b 396d4f02_6783_0b0c_3500_53a67b7c54ae["buildAndTestExtensions()"] 5fee8731_b60a_55eb_a4e0_95679d86d20d -->|calls| 396d4f02_6783_0b0c_3500_53a67b7c54ae 07d094fe_2982_f914_594d_fc1291fbeee9["printFinalInstructions()"] 5fee8731_b60a_55eb_a4e0_95679d86d20d -->|calls| 07d094fe_2982_f914_594d_fc1291fbeee9 style 5fee8731_b60a_55eb_a4e0_95679d86d20d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
scripts/devtools/build-and-test.js lines 21–62
async function main() {
clear();
await confirm('Have you stopped all NPM DEV scripts?', () => {
const packagesPath = relative(process.cwd(), join(__dirname, 'packages'));
console.log('Stop all NPM DEV scripts in the following directories:');
console.log(
chalk.bold(' ' + join(packagesPath, 'react-devtools-core')),
chalk.gray('(start:backend, start:standalone)')
);
console.log(
chalk.bold(' ' + join(packagesPath, 'react-devtools-inline')),
chalk.gray('(start)')
);
const buildAndTestScriptPath = join(__dirname, 'build-and-test.js');
const pathToPrint = relative(process.cwd(), buildAndTestScriptPath);
console.log('\nThen restart this release step:');
console.log(chalk.bold.green(' ' + pathToPrint));
});
await confirm('Have you run the prepare-release script?', () => {
const prepareReleaseScriptPath = join(__dirname, 'prepare-release.js');
const pathToPrint = relative(process.cwd(), prepareReleaseScriptPath);
console.log('Begin by running the prepare-release script:');
console.log(chalk.bold.green(' ' + pathToPrint));
});
const archivePath = await archiveGitRevision();
const currentCommitHash = await downloadLatestReactBuild();
await buildAndTestInlinePackage();
await buildAndTestStandalonePackage();
await buildAndTestExtensions();
saveBuildMetadata({archivePath, currentCommitHash});
printFinalInstructions();
}
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does main() do?
main() is a function in the react codebase, defined in scripts/devtools/build-and-test.js.
Where is main() defined?
main() is defined in scripts/devtools/build-and-test.js at line 21.
What does main() call?
main() calls 6 function(s): archiveGitRevision, buildAndTestExtensions, buildAndTestInlinePackage, buildAndTestStandalonePackage, downloadLatestReactBuild, printFinalInstructions.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free