@react-native-community/cli-tools

  • Version 9.2.1
  • Published
  • 135 kB
  • 9 dependencies
  • MIT license

Install

npm i @react-native-community/cli-tools
yarn add @react-native-community/cli-tools
pnpm add @react-native-community/cli-tools

Overview

Overview not available.

Index

Variables

variable logger

const logger: {
success: (...messages: string[]) => void;
info: (...messages: string[]) => void;
warn: (...messages: string[]) => void;
error: (...messages: string[]) => void;
debug: (...messages: string[]) => void;
log: (...messages: string[]) => void;
setVerbose: (level: boolean) => void;
isVerbose: () => boolean;
disable: () => void;
enable: () => void;
};

    variable NoopLoader

    const NoopLoader: typeof OraNoop;

      Functions

      function fetch

      fetch: (
      url: string | Request,
      options?: FetchOptions | undefined
      ) => Promise<{ status: number; data: any; headers: Headers }>;

        function fetchToTemp

        fetchToTemp: (url: string) => Promise<string>;
        • Downloads the given url to the OS's temp folder and returns the path to it.

        function findProjectRoot

        findProjectRoot: (cwd?: string) => string;
        • Finds project root by looking for a closest package.json.

        function getDefaultUserTerminal

        getDefaultUserTerminal: () => string | undefined;

          function getLoader

          getLoader: (options?: string | Options | undefined) => Ora;

            function hookStdout

            hookStdout: (callback: Function) => () => void;

              function inlineString

              inlineString: (str: string) => string;

                function isPackagerRunning

                isPackagerRunning: (
                packagerPort?: string | number
                ) => Promise<'running' | 'not_running' | 'unrecognized'>;
                • Indicates whether or not the packager is running. It returns a promise that returns one of these possible values: - running: the packager is running - not_running: the packager nor any process is running on the expected port. - unrecognized: one other process is running on the port we expect the packager to be running.

                function launchDebugger

                launchDebugger: (url: string) => Promise<void>;
                • Copyright (c) Facebook, Inc. and its affiliates.

                  This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.

                function launchDefaultBrowser

                launchDefaultBrowser: (url: string) => Promise<void>;
                • Copyright (c) Facebook, Inc. and its affiliates.

                  This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.

                function launchEditor

                launchEditor: (
                fileName: string,
                lineNumber: number,
                projectRoots: ReadonlyArray<string>
                ) => void;
                • Copyright (c) Facebook, Inc. and its affiliates.

                  This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.

                function releaseChecker

                releaseChecker: (root: string) => Promise<void>;

                  function resolveNodeModuleDir

                  resolveNodeModuleDir: (root: string, packageName: string) => string;
                  • Finds a path inside node_modules

                  Classes

                  class CLIError

                  class CLIError extends Error {}
                  • A custom Error that creates a single-lined message to match current styling inside CLI. Uses original stack trace when originalError is passed or erase the stack if it's not defined.

                  constructor

                  constructor(msg: string, originalError?: string | Error);

                    Type Aliases

                    type Loader

                    type Loader = Ora;

                      Package Files (14)

                      Dependencies (9)

                      Dev Dependencies (5)

                      Peer Dependencies (0)

                      No peer dependencies.

                      Badge

                      To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                      You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@react-native-community/cli-tools.

                      • Markdown
                        [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@react-native-community/cli-tools)
                      • HTML
                        <a href="https://www.jsdocs.io/package/@react-native-community/cli-tools"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>