Switch to Yarn (from npm)

I switched to yarn from npm cause it does everything that npm does (almost everything and more) , only faster.

And by faster I mean, really really fast, like ultrafast.

What is yarn, anyways?
Its a package manager for your code (just like npm) from Facebook.


How to install yarn on your OSX?
brew install yarn
This will also install node.

Use this if you want to skip installing node.
brew install yarn --without-node

You could also use npm itself to install yarn ( and then switch to yarn completely )
npm i -g yarn


If you are already familiar with npm heres a list of commands that can help you switch to yarn faster:

here will be a table

Example of “yarn why <package>”

Pretty useful command to get package details and info

nsingh$ yarn why babel-core
yarn why v0.27.5
[1/4] Why do we have the module "babel-core"...?
[2/4] Initialising dependency graph...
[3/4] Finding dependency...
[4/4] Calculating file sizes...
info Has been hoisted to "babel-core"
info Reasons this module exists
- "babel-core#babel-register" depends on it
- Specified in "devDependencies"
info Disk size without dependencies: "228kB"
info Disk size with unique dependencies: "8.25MB"
info Disk size with transitive dependencies: "17.06MB"
info Number of shared dependencies: 28
Done in 0.91s

Screenshot of “yarn upgrade-interactive v0.27.5 “

 

 

 

 

 

 

Speed Test : npm vs yarn

npm install took 26 secs

yarn install tool 9.95 secs

(Note : I will be updating this page as and when needed)

 

 

Posted in Generic, Web Technology

Leave a Reply

Your email address will not be published. Required fields are marked *

*