Merge branch 'master' into feature/npm-wrapper

This commit is contained in:
Augusto Moura 2021-07-19 14:39:56 -03:00
commit ad32fc9918
No known key found for this signature in database
GPG Key ID: 67F85AF470AE27DA
3 changed files with 3 additions and 23 deletions

View File

@ -26,23 +26,9 @@ Node.js plugin for [asdf](https://github.com/asdf-vm/asdf) version manager
After installing [asdf](https://github.com/asdf-vm/asdf), install the plugin by running:
```bash
asdf plugin-add nodejs https://github.com/asdf-vm/asdf-nodejs.git
asdf plugin add https://github.com/asdf-vm/asdf-nodejs.git
```
We also support auto-reshimming of global npm package installations via a custom npm wrapper
For setting auto-reshiming, link the [wrapper file](./wrappers/bin/npm) somewhere into the path before the asdf shims directory, or simply add the following lines to your .bashrc/.zshrc configuration *after activating asdf*:
```
asdf list nodejs > /dev/null 2>&1 && \
PATH="$(asdf nodejs wrappers-path):$PATH"
```
> **Explanation:**
>
> Reshimming is the process of telling asdf to search for globally installed binaries, if we run `npm install -g typescript` we need to tell asdf to search for global installed binaries (), so that he can link them correctly with nodejs version changes,`tsc` the Typescript compiler will be found and shimmed by asdf in this example.
>
> This step is necessary because of the high dynamicity of nodejs version switching
## Use
Check [asdf](https://github.com/asdf-vm/asdf) readme for instructions on how to install & manage versions of Node.js.

View File

@ -13,10 +13,7 @@ KEYS="9554F04D7259F04124DE6B476D5A82AC7E37093B \
7937DFD2AB06298B2293C3187D33FF9D0246406D \
1C050899334244A8AF75E53792EF661D867B9DFA"
SERVERS="ha.pool.sks-keyservers.net
p80.pool.sks-keyservers.net:80 \
ipv4.pool.sks-keyservers.net \
keyserver.ubuntu.com
SERVERS="keyserver.ubuntu.com
keyserver.ubuntu.com:80 \
pgp.mit.edu
pgp.mit.edu:80"

View File

@ -17,10 +17,7 @@ KEYS="4ED778F539E3634C779C87C6D7062848A1AB005C \
108F52B48DB57BB0CC439B2997B01419BD92F80A \
B9E2F5981AA6E0CD28160D9FF13993A75599653C"
SERVERS="ha.pool.sks-keyservers.net
p80.pool.sks-keyservers.net:80 \
ipv4.pool.sks-keyservers.net \
keyserver.ubuntu.com
SERVERS="keyserver.ubuntu.com
keyserver.ubuntu.com:80 \
pgp.mit.edu
pgp.mit.edu:80"