copy-repo-to-temp-directory.js — react Source File
Architecture documentation for copy-repo-to-temp-directory.js, a javascript file in the react codebase.
Entity Profile
Relationship Graph
Source Code
#!/usr/bin/env node
'use strict';
const {exec} = require('child-process-promise');
const {join} = require('path');
const {tmpdir} = require('os');
const {logPromise} = require('../utils');
const theme = require('../theme');
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});
};
module.exports = async params => {
return logPromise(
run(params),
theme`Copying React repo to temporary directory ({path ${params.tempDirectory}})`
);
};
Domain
Subdomains
Source
Frequently Asked Questions
What does copy-repo-to-temp-directory.js do?
copy-repo-to-temp-directory.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Entrypoint subdomain.
What functions are defined in copy-repo-to-temp-directory.js?
copy-repo-to-temp-directory.js defines 2 function(s): module, run.
Where is copy-repo-to-temp-directory.js in the architecture?
copy-repo-to-temp-directory.js is located at scripts/release/build-release-locally-commands/copy-repo-to-temp-directory.js (domain: BabelCompiler, subdomain: Entrypoint, directory: scripts/release/build-release-locally-commands).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free