Skip to content

getPackageManagerRunCommand

Builds the command parts that run a package script through the manager that owns the tree.

Import:

import { getPackageManagerRunCommand } from '@mnaoumov/typescript-dev-toolkit/package-manager';

Signature:

function getPackageManagerRunCommand(cwd: string | undefined): string[]

Parameters:

Parameter Type Description
cwd string | undefined The current working folder to resolve from.

Returns: string[] — The command parts, e.g. ['bun', 'run']. The script name is appended by the caller.