Add xdg wrappers for node and npm

This commit is contained in:
crater2150 2023-01-23 15:23:25 +01:00
parent ef0ddc9681
commit cfcdf95814
2 changed files with 8 additions and 0 deletions

4
xdg-wrappers/node Executable file
View file

@ -0,0 +1,4 @@
#!/bin/zsh
source ${$(realpath "$0"):h:h}/lib/next-in-path.zsh
export NODE_REPL_HISTORY="$XDG_DATA_HOME"/node_repl_history
$(next-in-path node $0) $@

4
xdg-wrappers/npm Executable file
View file

@ -0,0 +1,4 @@
#!/bin/zsh
source ${$(realpath "$0"):h:h}/lib/next-in-path.zsh
export NPM_CONFIG_USERCONFIG=$XDG_CONFIG_HOME/npm/npmrc
$(next-in-path npm $0) $@