Some yarn functionality

This commit is contained in:
Andrew Tomaka 2017-01-14 12:18:34 -05:00
parent 2b50656cda
commit 0f3bd4652a
2 changed files with 17 additions and 0 deletions

View file

@ -79,4 +79,9 @@ alias tls="tmux list-sessions"
alias v="vim"
alias w="python -m SimpleHTTPServer"
alias wo="curl http://wttr.in/48912?m"
alias y="yarn"
alias ya="yarn add"
alias yad="yarn add --dev"
alias ye="yarn-exec"
alias yi="yarn-install-like-bundle"
alias x="exit"

View file

@ -55,3 +55,15 @@ function run {
function npm-exec {
(PATH=$(npm bin):$PATH; eval $@;)
}
function yarn-exec {
(PATH=$(yarn bin):$PATH; eval $@;)
}
function yarn-install-like-bundle {
if [ -f yarn.lock ]; then
yarn install --pure-lockfile
else
yarn install
fi
}