Detects the correct JS package manager and uses it.
npm install --global @comandeer/apm
Just enter the directory of your JS project and replace your package manager binary name with the apm
, e.g. instead of
npm install
run
apm install
The apm
binary detects which package manager is used in the JS project and runs it, passing all received arguments. Currently three package managers are supported:
For now, the algorithm for detecting the right package manager is:
- check for the
packageManager
field inside the nearestpackage.json
file; - otherwise, look for the lock files:
package-lock.json
fornpm
,pnpm-lock.yaml
forpnpm
,yarn.lock
foryarn
;
- otherwise, fallback to
npm
.
npx
,pnpx
andyarn dxl
are not currently supported. There's a plan to addapx
binary in one of the following versions.
See LICENSE file for details.