Home / File/ test.js — react Source File

test.js — react Source File

Architecture documentation for test.js, a javascript file in the react codebase.

Entity Profile

Source Code

#!/usr/bin/env node

'use strict';

const open = require('open');
const os = require('os');
const osName = require('os-name');
const {resolve} = require('path');
const {argv} = require('yargs');

const EXTENSION_PATH = resolve('./edge/build/unpacked');
const START_URL = argv.url || 'https://react.dev/';

const extargs = `--load-extension=${EXTENSION_PATH}`;

const osname = osName(os.platform());
let appname;

if (osname && osname.toLocaleLowerCase().startsWith('windows')) {
  appname = 'msedge';
} else if (osname && osname.toLocaleLowerCase().startsWith('mac')) {
  appname = 'Microsoft Edge';
} else if (osname && osname.toLocaleLowerCase().startsWith('linux')) {
  //Coming soon
}

if (appname) {
  (async () => {
    await open(START_URL, {app: [appname, extargs]});
  })();
}

Frequently Asked Questions

What does test.js do?
test.js is a source file in the react codebase, written in javascript.
Where is test.js in the architecture?
test.js is located at packages/react-devtools-extensions/edge/test.js (directory: packages/react-devtools-extensions/edge).

Analyze Your Own Codebase

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

Try Supermodel Free