Support non-default default-npm-packages location.

This commit is contained in:
Brian van Burken 2020-08-02 20:27:53 +02:00
parent cd8dc32e82
commit 9c9bc7f973
No known key found for this signature in database
GPG Key ID: 5889939D1813CD2A
2 changed files with 3 additions and 1 deletions

View File

@ -63,6 +63,8 @@ request
express express
``` ```
You can specify a non-default location of this file by setting a `ASDF_NPM_DEFAULT_PACKAGES_FILE` variable.
## Temporarily disable reshimming ## Temporarily disable reshimming
To avoid a slowdown when installing large packages (see https://github.com/asdf-vm/asdf-nodejs/issues/46), you can `ASDF_SKIP_RESHIM=1 npm i -g <package>` and reshim after installing all packages using `asdf reshim nodejs`. To avoid a slowdown when installing large packages (see https://github.com/asdf-vm/asdf-nodejs/issues/46), you can `ASDF_SKIP_RESHIM=1 npm i -g <package>` and reshim after installing all packages using `asdf reshim nodejs`.

View File

@ -265,7 +265,7 @@ verlte() {
} }
install_default_npm_packages() { install_default_npm_packages() {
local default_npm_packages="${HOME}/.default-npm-packages" local default_npm_packages="${ASDF_NPM_DEFAULT_PACKAGES_FILE:=$HOME/.default-npm-packages}"
if [ ! -f "$default_npm_packages" ]; then return; fi if [ ! -f "$default_npm_packages" ]; then return; fi