build-artifacts.js — react Source File
Architecture documentation for build-artifacts.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 {logPromise} = require('../utils');
const shell = require('shelljs');
const run = async ({cwd, dry, tempDirectory}) => {
const defaultOptions = {
cwd: tempDirectory,
};
await exec('yarn install', defaultOptions);
await exec('yarn build -- --extract-errors', defaultOptions);
const tempNodeModulesPath = join(tempDirectory, 'build', 'node_modules');
const buildPath = join(cwd, 'build');
shell.cp('-r', tempNodeModulesPath, buildPath);
};
module.exports = async params => {
return logPromise(run(params), 'Building artifacts', 600000);
};
Domain
Subdomains
Source
Frequently Asked Questions
What does build-artifacts.js do?
build-artifacts.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Optimization subdomain.
What functions are defined in build-artifacts.js?
build-artifacts.js defines 2 function(s): module, run.
Where is build-artifacts.js in the architecture?
build-artifacts.js is located at scripts/release/build-release-locally-commands/build-artifacts.js (domain: BabelCompiler, subdomain: Optimization, 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