vlt / docs

  • PricingBenchmarks (opens in new window)Community (opens in new window)Feedback
  • Overview
    • Overview
    • Reference
  • Functions
  • cmdShim()
  • cmdShimIfExists()
  • findCmdShim()
  • findCmdShimIfExists()
  • readCmdShim()
  • readCmdShimIfExists()
  1. Client
  2. /
  3. API Reference
  4. /
  5. @vltpkg/cmd-shim
  6. /
  7. Reference

Reference

Functions

cmdShim()

TypeScript
function cmdShim(
   from, 
   to, 
remover): Promise<void>

Defined in: index.ts:46

Parameters

ParameterType
fromstring
tostring
removerRollbackRemove

Returns

Promise<void>


cmdShimIfExists()

TypeScript
function cmdShimIfExists(
   from, 
   to, 
remover): Promise<void>

Defined in: index.ts:33

Parameters

ParameterType
fromstring
tostring
removerRollbackRemove

Returns

Promise<void>


findCmdShim()

TypeScript
function findCmdShim(path): Promise<[string, string]>

Defined in: read.ts:57

Find a matching cmd, cygwin, powershell, or symlink executable, and return the matching file and the target it references in a [string,string] tuple if found, or throw if not found.

Parameters

ParameterType
pathstring

Returns

Promise<[string, string]>


findCmdShimIfExists()

TypeScript
function findCmdShimIfExists(path): Promise<undefined | [string, string]>

Defined in: read.ts:42

Find a matching cmd, cygwin, powershell, or symlink executable, and return the matching file and the target it references in a [string,string] tuple if found, or undefined if not.

Parameters

ParameterType
pathstring

Returns

Promise<undefined | [string, string]>


readCmdShim()

TypeScript
function readCmdShim(path): Promise<string>

Defined in: read.ts:88

Read the specified executable shim, returning the target it references. Raise an error if it does not exist or cannot be read.

Parameters

ParameterType
pathstring

Returns

Promise<string>


readCmdShimIfExists()

TypeScript
function readCmdShimIfExists(path): Promise<undefined | string>

Defined in: read.ts:72

Read the specified executable shim if it exists, returning the target it references. Return undefined if it does not exist or cannot be dereferenced.

Parameters

ParameterType
pathstring

Returns

Promise<undefined | string>


Previous@vltpkg/cmd-shimNext@vltpkg/config

On this page

  • Functions
  • cmdShim()
  • cmdShimIfExists()
  • findCmdShim()
  • findCmdShimIfExists()
  • readCmdShim()
  • readCmdShimIfExists()

Deploy your package on vlt.io

Publish scoped and private packages, manage organizations and access, and give every developer and CI environment a consistent source for public and private JavaScript dependencies.

Publish now