-
-
Save beenotung/92559fcd80e9b72d6279fb579c083625 to your computer and use it in GitHub Desktop.
proxy npm to call pnpm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
set -o pipefail | |
case "$1" in | |
i|install) | |
shift | |
case "$1" in | |
-g|--global) | |
shift | |
npx --no npm i -g $@ | |
exit $? | |
;; | |
esac | |
echo >&2 original: npm $@ | |
echo >&2 mapto: pnpm install $@ | |
pnpm install $@ | |
exit $? | |
;; | |
esac | |
npx --no npm "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment