Home / Function/ main() — react Function Reference

main() — react Function Reference

Architecture documentation for the main() function in publish-release.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  7432554c_b057_f600_c294_f31d31c1666a["main()"]
  2073ecda_ac22_e62c_fb04_236af8022ec8["publish-release.js"]
  7432554c_b057_f600_c294_f31d31c1666a -->|defined in| 2073ecda_ac22_e62c_fb04_236af8022ec8
  edf7d9af_6c6f_2c2b_ce81_1a87700830bc["publishToNPM()"]
  7432554c_b057_f600_c294_f31d31c1666a -->|calls| edf7d9af_6c6f_2c2b_ce81_1a87700830bc
  f88b17f1_02a5_568f_8c02_a5114000a980["printFinalInstructions()"]
  7432554c_b057_f600_c294_f31d31c1666a -->|calls| f88b17f1_02a5_568f_8c02_a5114000a980
  style 7432554c_b057_f600_c294_f31d31c1666a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

scripts/devtools/publish-release.js lines 21–39

async function main() {
  clear();

  await confirm('Have you run the build-and-test script?', () => {
    const buildAndTestScriptPath = join(__dirname, 'build-and-test.js');
    const pathToPrint = relative(process.cwd(), buildAndTestScriptPath);

    console.log('Begin by running the build-and-test script:');
    console.log(chalk.bold.green('  ' + pathToPrint));
  });

  const {archivePath, currentCommitHash} = readSavedBuildMetadata();

  await checkNPMPermissions();

  await publishToNPM();

  await printFinalInstructions(currentCommitHash, archivePath);
}

Domain

Subdomains

Frequently Asked Questions

What does main() do?
main() is a function in the react codebase, defined in scripts/devtools/publish-release.js.
Where is main() defined?
main() is defined in scripts/devtools/publish-release.js at line 21.
What does main() call?
main() calls 2 function(s): printFinalInstructions, publishToNPM.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free