Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how can i check the size of npm packages before download?

Tags:

Is there any online utility or tool that helps me to find out the exact size of node packages before downloading or installing them or is there any way to check the size of git repositories so that i can check the size of the package from its git repository

like image 355
Amante Ninja Avatar asked Mar 29 '17 13:03

Amante Ninja


People also ask

How do I know what size my package is?

Determine the package measurement in inches. For each measurement, start at the longest point, rounding each measurement to the nearest whole number. Multiply the package length (longest side of the package) by the width by the height. The result is the cubic size in inches.

How much space does npm take?

Please reserve at least 6 GB for OS resources and npm On-Site appliance containers. Once installed, you can configure where registry data is stored on your server via the "Storage" paths on the "Settings" page of the admin web console (port 8800).

How are npm downloads calculated?

Npm's download stats are native by design: they are simply a count of the number of HTTP 200 responses we served that were tarball files, i.e. packages. This means the number includes: automated build servers. downloads by mirrors.


1 Answers

I've created a tool that does this. It's called npm-download-size. A cli version is also available.

Just type a package name and Go!:

npm download size start page

Here is webpack analyzed:

download size of webpack

The cli tool can be installed with:

npm i -g download-size

And used like this:

$ download-size lodash
[email protected]: 303.39 KiB

Here is an asciinema demo of the cli tool.

like image 77
arve0 Avatar answered Sep 23 '22 11:09

arve0