Merge pull request #170 from brianvanburken/default-packages-location

Support non-default default-npm-packages location.
This commit is contained in:
Trevor Brown 2020-12-21 08:44:43 -05:00 committed by GitHub
commit a5aa464e96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -69,6 +69,8 @@ request
express
```
You can specify a non-default location of this file by setting a `ASDF_NPM_DEFAULT_PACKAGES_FILE` variable.
## 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`.

View File

@ -267,7 +267,7 @@ verlte() {
}
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