Brought to you by Allons-y Studio

Function: detectPackageManager()

function detectPackageManager(
   cwd, 
   hostPkg?, 
   env?
): PackageManager;

Defined in: pkg-manager.ts:117

Detect the host project's package manager. See inspectPackageManager for the order and for how sure the answer is.

Parameters

Parameter Type Default value Description
cwd string undefined The project directory.
hostPkg? PackageJson undefined The project's package.json.
env? Environment process.env The environment to read the launcher from.

Returns

PackageManager