mirror of
https://github.com/asdf-vm/asdf-nodejs.git
synced 2024-10-06 07:42:08 +08:00
Merge branch 'master' into feature/npm-wrapper
This commit is contained in:
commit
ad32fc9918
16
README.md
16
README.md
@ -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.
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user