https://github.com/arve0/npm-download-size-cli
get download size for npm packages, including their dependencies
https://github.com/arve0/npm-download-size-cli
Last synced: 20 days ago
JSON representation
get download size for npm packages, including their dependencies
- Host: GitHub
- URL: https://github.com/arve0/npm-download-size-cli
- Owner: arve0
- Created: 2017-10-10T11:19:12.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-11-12T19:12:48.000Z (over 1 year ago)
- Last Synced: 2025-04-07T23:02:43.642Z (about 2 months ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/download-size
- Size: 38.1 KB
- Stars: 20
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# npm download size
Are you on slow connection or limited mobile plan? Care about tarball size of your package? Care about bloat? How many bytes download are `npm i lodash`? Check with```sh
$ download-size lodash
[email protected]: 303.39 KiB
```before installing!
npm-download-size is also available online: https://arve0.github.io/npm-download-size/
Package sizes are resolved through a [server side API](https://github.com/arve0/npm-download-size-api), so only statistics is ever downloaded while using this tool.
## Install
```sh
npm install -g download-size # 8 KiB download
```## Usage
```sh
$ download-size svelte
[email protected]: 1.12 MiB$ download-size -f package.json
package.json ([email protected]):
devDependencies:
[email protected]: 429.35 KiB
[email protected]: 845.42 KiB
[email protected]: 216.54 KiB
[email protected]: 239.76 KiB
[email protected]: 185.16 KiB
[email protected]: 71.01 KiB
[email protected]: 827.78 KiB
[email protected]: 1.12 MiB
All dependencies: 3.87 MiB
```The reported size includes all dependecies. `download-size` gets size from the gzipped tarballs (e.g. http://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz), so space on disk will be higher.
## Why?
Many node packages are bloated beyond belief. This tool helps you take an informed decision. Should you rely on that package? [1,1 MB for doing HTTP requests](https://arve0.github.io/npm-download-size/#request) you say? Take a stand against bloat!## License
MIT