HomeToolsAbout a20k

Yarn

Installation

Pre-requisite: nodenv and npm

Install yarn globally

npm install --global yarn

Packages

Adding packages

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

Removing packages

# remove package yarn remove package_name

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, keeping your production environment lean and efficient

Run in Mode

DEBUG_MODE=true yarn start:server
© VincentVanKoh