diff --git a/aliases b/aliases index 79b15ef..a62d470 100644 --- a/aliases +++ b/aliases @@ -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" diff --git a/functions b/functions index 7175021..afd88f1 100644 --- a/functions +++ b/functions @@ -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 +}