How to use @expo/dev-tools - 2 common examples

To help you get started, we’ve selected a few @expo/dev-tools examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github expo / expo-cli / packages / expo-cli / src / commands / start.js View on Github external
async function action(projectDir, options) {
  installExitHooks(projectDir);

  await urlOpts.optsAsync(projectDir, options);

  log(chalk.gray('Starting project at', projectDir));

  let rootPath = path.resolve(projectDir);
  let devToolsUrl = await DevToolsServer.startAsync(rootPath);
  log(`Expo DevTools is running at ${chalk.underline(devToolsUrl)}`);

  const { exp } = await ProjectUtils.readConfigJsonAsync(projectDir);
  if (exp === null) {
    log.warn('No Expo configuration found. Are you sure this is a project directory?');
    process.exit(1);
  }

  const nonInteractive = options.parent && options.parent.nonInteractive;
  if (!nonInteractive && !exp.isDetached) {
    if (await UserSettings.getAsync('openDevToolsAtStartup', true)) {
      log(`Opening DevTools in the browser... (press ${chalk.bold`shift-d`} to disable)`);
      opn(devToolsUrl, { wait: false });
    } else {
      log(
        `Press ${chalk.bold`d`} to open DevTools now, or ${chalk.bold`shift-d`} to always open it automatically.`
github expo / expo-cli / packages / expo-cli / src / commands / start.js View on Github external
async function tryOpeningDevToolsAsync({ rootPath, exp, options }): Promise {
  const devToolsUrl = await DevToolsServer.startAsync(rootPath);
  log(`Expo DevTools is running at ${chalk.underline(devToolsUrl)}`);

  if (!options.nonInteractive && !exp.isDetached) {
    if (await UserSettings.getAsync('openDevToolsAtStartup', true)) {
      log(`Opening DevTools in the browser... (press ${chalk.bold`shift-d`} to disable)`);
      openBrowser(devToolsUrl);
    } else {
      log(
        `Press ${chalk.bold`d`} to open DevTools now, or ${chalk.bold`shift-d`} to always open it automatically.`
      );
    }
  }
}

@expo/dev-tools

The Expo Dev Tools UI has been deprecated. [Learn more](https://blog.expo.dev/sunsetting-the-web-ui-for-expo-cli-ab12936d2206).

MIT
Latest version published 1 year ago

Package Health Score

56 / 100
Full package analysis

Popular @expo/dev-tools functions

Similar packages