HomeToolsAbout

Yarn

Installation

Pre-requisite: nodenv, node, and npm.

Install yarn globally

npm install --global yarn

Packages

Add/Remove packages

# add package to the project yarn add package_name # add package globally yarn global add package_name # remove package yarn remove package_name

Install packages and Run

yarn install yarn dev # defined in package.json

View packages

# 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 package

# 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

Dev Dependencies

yarn add <package-name> --dev
  • Dev dependencies are ran during development, but are skipped during the building of production environment.
  • This keeps your production environment lean and efficient.

Run in Mode

DEBUG_MODE=true yarn start:server
AboutContact