Pre-requisite: nodenv
and npm
Install yarn globally
npm install --global yarn
# add package to the project yarn add package_name # add package globally yarn global add package_name
# remove package yarn remove package_name
# view all packages installed yarn list # view specific package name yarn list --pattern package_name # view dependencies of a package yarn list package_name # view outdated packages yarn outdated
# upgrade all packages in a project yarn upgrade # upgrade to latest version yarn upgrade --latest # upgrade the package to specified version yarn upgrade package_name@version
Upgrade Global
# upgrade all global packages yarn global upgrade # upgrade specific global package yarn global update package_name # upgrade all global packages to latest yarn global upgrade --latest
yarn add <package-name> --dev
development
, but are skipped during the building of production environment, keeping your production environment lean and efficientDEBUG_MODE=true yarn start:server