Home / Function/ run() — react Function Reference

run() — react Function Reference

Architecture documentation for the run() function in copy-repo-to-temp-directory.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  240d9b7a_355a_c2b3_5d80_ae02bef605c2["run()"]
  0bdec6ec_2b18_8e93_cf95_3a3dc7caae38["copy-repo-to-temp-directory.js"]
  240d9b7a_355a_c2b3_5d80_ae02bef605c2 -->|defined in| 0bdec6ec_2b18_8e93_cf95_3a3dc7caae38
  bb5fa17a_042c_daf5_a9ae_7066715558cd["module()"]
  bb5fa17a_042c_daf5_a9ae_7066715558cd -->|calls| 240d9b7a_355a_c2b3_5d80_ae02bef605c2
  style 240d9b7a_355a_c2b3_5d80_ae02bef605c2 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

scripts/release/build-release-locally-commands/copy-repo-to-temp-directory.js lines 11–25

const run = async ({commit, cwd, tempDirectory}) => {
  const directory = `react-${commit}`;
  const temp = tmpdir();

  if (tempDirectory !== join(tmpdir(), directory)) {
    throw Error(`Unexpected temporary directory "${tempDirectory}"`);
  }

  await exec(`rm -rf ${directory}`, {cwd: temp});
  await exec(`git archive --format=tar --output=${temp}/react.tgz ${commit}`, {
    cwd,
  });
  await exec(`mkdir ${directory}`, {cwd: temp});
  await exec(`tar -xf ./react.tgz -C ./${directory}`, {cwd: temp});
};

Domain

Subdomains

Called By

Frequently Asked Questions

What does run() do?
run() is a function in the react codebase, defined in scripts/release/build-release-locally-commands/copy-repo-to-temp-directory.js.
Where is run() defined?
run() is defined in scripts/release/build-release-locally-commands/copy-repo-to-temp-directory.js at line 11.
What calls run()?
run() is called by 1 function(s): module.

Analyze Your Own Codebase

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

Try Supermodel Free