dotfiles/files/zshrc/javascript.sh

33 lines
432 B
Bash
Raw Normal View History

2016-09-12 15:52:11 +01:00
# npm aliases
alias ni="npm install"
alias ns="npm start"
alias nt="npm test"
nb() {
if [ $# -eq 0 ]; then
command npm run build
else
for arg in "$@"
do
command npm run build-${arg}
done
fi
}
nr() {
for arg in "$@"
do
command npm run $arg
done
}
2018-10-14 20:11:32 +01:00
nvm() { # This takes ~1sec, so we lazy-load it.
unset $0
2018-10-06 14:04:45 +01:00
source "/usr/share/nvm/init-nvm.sh"
2018-10-14 20:11:32 +01:00
$0 $@
}
2019-11-01 09:11:19 +00:00
npx () {
command $(npm bin)/$@
}