Posts

Showing posts from February, 2021

Usage

  Starting a new project yarn init Adding a dependency yarn add [ package] yarn add [ package]@[version] yarn add [ package]@[tag] Adding a dependency to different categories of dependencies Add to  devDependencies ,  peerDependencies , and  optionalDependencies  respectively: yarn add [ package] --dev yarn add [ package] --peer yarn add [ package] --optional Upgrading a dependency yarn upgrade [ package] yarn upgrade [ package]@[version] yarn upgrade [ package]@[tag] Removing a dependency yarn remove [ package] Installing all the dependencies of project yarn or yarn install

Installation

  Install via npm It is recommended to install Yarn through the  npm package manager , which comes bundled with  Node.js  when you install it on your system. Once you have npm installed you can run the following both to  install  and  upgrade  Yarn: npm install --global yarn Check installation Check that Yarn is installed by running: yarn --version