alias y="yarn"
alias yi="yarn init -y"
alias ya="yarn add"
alias yr="yarn remove"
alias yad="yarn add -D"
alias yga="yarn global add"
alias ygr="yarn global remove"
alias yu="yarn upgrade"
alias ygu="yarn global upgrade"
alias ycc="yarn cache clean"
alias yrun="yarn run"
alias yl="yarn list --depth=0"
alias ygl="yarn global list --depth=0"
alias yo="yarn outdated"
To change the prefix of the git tag you can use version-tag-prefix
.
$ yarn config set version-tag-prefix "v"
Using the yarn version
command you can update the version of your package via the command line.
$ yarn version
$ yarn version --major
$ yarn version --minor
$ yarn version --patch
======================= NEW REVISION
Create a new package
$ yarn init
$ yarn init -y
Add dependencies to the project
$ yarn add <packageName>
$ yarn add -D <packageName>
$ yarn add -O <packageName>
$ yarn add -P <packageName>
$ yarn add <packageName>@<version>
Remove the shared cache files
$ yarn cache clean
$ yarn cache clean --mirror
$ yarn cache clean --all
Run a package in a temporary environment
$ yarn dlx <packageTemporary>
Install the project dependencies
$ yarn install
Connect the local project to another one
$ yarn link <destination>
$ yarn link ~/jquery-folder
Run a script defined in the package.json
$ yarn run <scriptName>
Upgrade dependencies across the project
$ yarn up
$ yarn up <packageName>