Browse Source

node: Add environment variable to store 'n' cache

See: https://github.com/tj/n#installation for details.
master
Indrajit Raychaudhuri 4 years ago committed by Indrajit Raychaudhuri
parent
commit
c5f83d31f5
  1. 5
      modules/node/README.md
  2. 6
      modules/node/init.zsh

5
modules/node/README.md

@ -23,6 +23,10 @@ home directory.
This will be loaded automatically if nvm is installed in `$NVM_DIR`, This will be loaded automatically if nvm is installed in `$NVM_DIR`,
_`$XDG_CONFIG_HOME/nvm`_, _`~/.nvm`_, or is installed with homebrew. _`$XDG_CONFIG_HOME/nvm`_, _`~/.nvm`_, or is installed with homebrew.
## Variables
- `N_PREFIX` stores the path to [_n_][8] cache.
## Functions ## Functions
- `node-doc` opens the Node.js online [API documentation][3] in the default - `node-doc` opens the Node.js online [API documentation][3] in the default
@ -58,3 +62,4 @@ _The authors of this module should be contacted via the [issue tracker][4]._
[5]: https://github.com/nodenv/nodenv [5]: https://github.com/nodenv/nodenv
[6]: https://github.com/sstephenson/rbenv [6]: https://github.com/sstephenson/rbenv
[7]: https://github.com/nvm-sh/nvm [7]: https://github.com/nvm-sh/nvm
[8]: https://github.com/tj/n

6
modules/node/init.zsh

@ -37,3 +37,9 @@ elif (( $+commands[brew] )) \
elif (( ! $+commands[node] )); then elif (( ! $+commands[node] )); then
return 1 return 1
fi fi
#
# Variables
#
N_PREFIX="${XDG_CONFIG_HOME:-$HOME/.config}/n" # The path to 'n' cache.

Loading…
Cancel
Save