Yarn – Fast and Secure Dependency Management

Yarn is a super simple dependency management tool which is way faster to use instead of traditional npm. It acts as a drop-in replacement, so you can get started using yarn right away. The best way to install yarn is by using npm. That’s right, you use npm to install yarn, npm’s replacement essentially, how fun is that!

There are a few great reasons as to why you should start using yarn today.

Yarn sets up a lock file with the exact versions being used within a project. This improves the speed of installation dramatically and also allows you to share your lock file with other developers to ensure that everyone involved is using the same version numbers of a given package.

Yarn also caches every package it downloads locally, this way you never need to download the same package twice.

Yarn also installs packages in parallel improving the speed in which projects are set up.

Yarn also uses checksums to install packages, making it super secure and validating the packages before any code is run within your codebase.

Installation

All of the following installation instructions are available on the yarn documentation. I have included the information below for ease of reference.

via NPM

My preferred method if you have NPM already installed on your system, you could simply run the following command to get yarn easily installed.

npm install --global yarn

There are plenty of other options to get it installed. I have included the link below to the yarn documentation for you to pick the option that works best for you.

Tags

About This Blog

I'm writing this blog in order to share what I'm learning with the world. Since you learn best by teaching others and writing things down, I figured this would be the best way to really tackle any new technologies I plan on learning. I hope this blog will help you as much as it will benefit me.