@zkochan/cmd-shim

  • Version 6.0.0
  • Published
  • 37.5 kB
  • 3 dependencies
  • BSD-2-Clause license

Install

npm i @zkochan/cmd-shim
yarn add @zkochan/cmd-shim
pnpm add @zkochan/cmd-shim

Overview

Used in pnpm for command line application support

Index

Variables

variable ifExists

var ifExists: (src: string, to: string, opts?: Options) => Promise<void>;

    Functions

    function cmdShim

    cmdShim: typeof cmdShim;
    • Try to create shims.

      Parameter src

      Path to program (executable or script).

      Parameter to

      Path to shims. Don't add an extension if you will create multiple types of shims.

      Parameter opts

      Options.

      Throws

      If src is missing.

    function cmdShimIfExists

    cmdShimIfExists: (src: string, to: string, opts?: Options) => Promise<void>;
    • Try to create shims.

      Does nothing if src doesn't exist.

      Parameter src

      Path to program (executable or script).

      Parameter to

      Path to shims. Don't add an extension if you will create multiple types of shims.

      Parameter opts

      Options.

    Interfaces

    interface Options

    interface Options {}

      property args

      args?: string;
      • The arguments to initialize the node process with.

      property createCmdFile

      createCmdFile?: boolean;
      • If a Windows Command Prompt script should be created.

        false

      property createPwshFile

      createPwshFile?: boolean;
      • If a PowerShell script should be created.

        true

      property fs

      fs?: typeof import('fs');
      • fs implementation to use. Must implement node's fs module interface.

      property nodeExecPath

      nodeExecPath?: string;

        property nodePath

        nodePath?: string | string[];
        • The value of the $NODE_PATH environment variable.

          The single string format is only kept for legacy compatibility, and the array form should be preferred.

        property prependToPath

        prependToPath?: string;
          preserveSymlinks?: boolean;
          • If symbolic links should be preserved.

            false

          property prog

          prog?: string;
          • The path to the executable file.

          property progArgs

          progArgs?: string[];
          • The arguments to initialize the target process with, before the actual CLI arguments

          Package Files (1)

          Dependencies (3)

          Dev Dependencies (11)

          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/@zkochan/cmd-shim.

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