Home / File/ publish-release.js — react Source File

publish-release.js — react Source File

Architecture documentation for publish-release.js, a javascript file in the react codebase.

Entity Profile

Relationship Graph

Source Code

#!/usr/bin/env node

'use strict';

const chalk = require('chalk');
const {exec} = require('child-process-promise');
const {readJsonSync} = require('fs-extra');
const inquirer = require('inquirer');
const {join, relative} = require('path');
const {DRY_RUN, NPM_PACKAGES, ROOT_PATH} = require('./configuration');
const {
  checkNPMPermissions,
  clear,
  confirm,
  execRead,
  logger,
  readSavedBuildMetadata,
} = require('./utils');

// This is the primary control function for this script.
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);
}

async function printFinalInstructions(currentCommitHash, archivePath) {
  console.log('');
  console.log(
    'You are now ready to publish the extension to Chrome, Edge, and Firefox:'
  );
  console.log(
    `  ${chalk.blue.underline(
      'https://fburl.com/publish-react-devtools-extensions'
    )}`
  );
  console.log('');
  console.log('When publishing to Firefox, remember the following:');
  console.log(`  Commit Hash: ${chalk.bold(currentCommitHash)}`);
  console.log(`  Git archive: ${chalk.bold(archivePath)}`);
  console.log('');
  console.log('Also consider syncing this release to Facebook:');
  console.log(`  ${chalk.bold.green('js1 upgrade react-devtools')}`);
}

async function publishToNPM() {
// ... (63 more lines)

Domain

Subdomains

Frequently Asked Questions

What does publish-release.js do?
publish-release.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 publish-release.js?
publish-release.js defines 3 function(s): main, printFinalInstructions, publishToNPM.
Where is publish-release.js in the architecture?
publish-release.js is located at scripts/devtools/publish-release.js (domain: BabelCompiler, subdomain: Entrypoint, directory: scripts/devtools).

Analyze Your Own Codebase

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

Try Supermodel Free