@comandeer/apm
v0.1.0
Published
Any package manager
Downloads
3
Maintainers
Readme
@comandeer/apm
Detects the correct JS package manager and uses it.
Installation
npm install --global @comandeer/apm
Usage
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
How does it work?
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
.
Known limitations
npx
,pnpx
andyarn dxl
are not currently supported. There's a plan to addapx
binary in one of the following versions.
License
See LICENSE file for details.