forked from mathiasbynens/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 10
/
.yarn-shortcuts.sh
54 lines (45 loc) · 1.1 KB
/
.yarn-shortcuts.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#Puboish package
alias npub='npm publish'
#Upgrade package using interactive terminal
alias yupa='yarn upgrade-interactive --latest && yarn upgrade'
alias yup='yarn upgrade-interactive'
alias yupg='yarn up'
#Check integrity of packages installed
alias ycheck='yarn check --integrity'
#Force yarn install
alias yf='yarn --force'
#Add packages to project
function add {
yarn add "$1"
}
#Add packages to project as dev dependency
function adddev {
yarn add "$1" --dev
}
#Remove packages to project
function remove {
yarn remove "$1"
}
#Publish to yalc and push to linekd repos
alias ypub='yalc publish --push'
#Add packages to project as a yalc link
function yadd {
yalc add "$1"
}
#Remove packages as a yalc link
function yremove {
yalc remove "$1"
}
function yhelp {
echo "
- - - - - - - - - - - - - -
Yarn Convenience Shortcuts:
- - - - - - - - - - - - - -
npub - Publish package via NPM
yup - Upgrade package dependencies (and downstream dependencies)
ycheck - Check integrity of packages installed
yf - Force yarn install
add/remove - shortcuts for adding and removing packages
- - - - - - - - - - - - - -
"
}