Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between yarn, grunt, npm, bower and nuget package manager?

I'm a .net developer with exposure to nuget package manager console only. I was reading about nodejs and reactjs; where both require npm & yarn packet managers.

Can any one explain the difference between these products? And why are they introduced?

like image 530
rohit singh Avatar asked Jun 12 '17 10:06

rohit singh


2 Answers

From Wikipedia: A package manager [...] is a collection of software tools that automates the process of installing, upgrading, configuring, and removing computer programs.

Instead of a complete computer program, you could also think of smaller parts like libraries, frameworks or just some a bunch of files packaged together.

While NuGet focusses mainly on .NET (there are a lot of non-.NET packages on NuGet however), NPM (Node Package Manager), Yarn and Bower are JavaScript package managers.

Yarn was created by Facebook and Open Sourced. Speed comparisons found online show that Yarn is faster than NPM. Yarn is also able to install packages from a cache and does not require a connection to the Internet (only if a package was downloaded before).

Grunt is a JavaScript Task Runner, not a package manager. You can use it to automate repetitive tasks like minification, compilation, unit testing, linting, etc.

like image 102
Emiel Koning Avatar answered Oct 16 '22 15:10

Emiel Koning


npm is node package manager.Basically it is used to install dependencies.In your case you will need this for reactJs.

Yarn package manager is also used for to install dependencies i.e to install javascript packages.

difference between npm and yarn is

Yarn To install packages time requires 10-12sec.

Yarn install all dependencies parallel.

To install dependency we always does not require internet connection

Npm

To install packages time requires 20-25sec

NPM always install each dependency one after other which might end up with lot of time

Installing dependencies always requires an internet connection.

like image 28
Sweety Avatar answered Oct 16 '22 16:10

Sweety