Home / File/ build-packages.js — react Source File

build-packages.js — react Source File

Architecture documentation for build-packages.js, a javascript file in the react codebase.

Entity Profile

Relationship Graph

Source Code

/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

const ora = require('ora');
const {execHelper} = require('./utils');

async function buildPackages(pkgNames) {
  const spinner = ora(`Building packages`).info();
  for (const pkgName of pkgNames) {
    const command = `NODE_ENV=production yarn workspace ${pkgName} run build --dts`;
    spinner.start(`Running: ${command}\n`);
    try {
      await execHelper(command);
    } catch (e) {
      spinner.fail(e.toString());
      throw e;
    }
    spinner.succeed(`Successfully built ${pkgName}`);
  }
  spinner.stop();
}

module.exports = {
  buildPackages,
};

Domain

Subdomains

Functions

Frequently Asked Questions

What does build-packages.js do?
build-packages.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-packages.js?
build-packages.js defines 1 function(s): buildPackages.
Where is build-packages.js in the architecture?
build-packages.js is located at compiler/scripts/release/shared/build-packages.js (domain: BabelCompiler, subdomain: Optimization, directory: compiler/scripts/release/shared).

Analyze Your Own Codebase

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

Try Supermodel Free