@capgo/find-package-manager
Advanced tools
Comparing version 0.0.11 to 0.0.12
export function findPackageManagerType (path?: string): 'yarn' | 'npm' | 'bun' | 'pnpm' | 'unknown'; | ||
export function findInstallCommand (packageManagerType?: 'yarn' | 'npm' | 'bun' | 'pnpm' | 'unknown'): 'install' | 'add'; |
15
main.js
@@ -22,2 +22,17 @@ import { existsSync } from 'fs'; | ||
} | ||
export const findInstallCommand = (packageManagerType = findPackageManagerType()) => { | ||
switch (packageManagerType) { | ||
case 'bun': | ||
return 'install'; | ||
case 'pnpm': | ||
return 'install'; | ||
case 'yarn': | ||
return 'add'; | ||
case 'npm': | ||
return 'install'; | ||
default: | ||
return 'install'; | ||
} | ||
} | ||
// console.log('findPackageManagerType', findPackageManagerType()) |
@@ -5,3 +5,3 @@ { | ||
"public": true, | ||
"version": "0.0.11", | ||
"version": "0.0.12", | ||
"license": "MIT", | ||
@@ -8,0 +8,0 @@ "description": "Live update for capacitor apps", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2249
37