https://github.com/beeequeue/sizer
🔢 A tiny CLI for checking file sizes with compression
https://github.com/beeequeue/sizer
Last synced: 9 months ago
JSON representation
🔢 A tiny CLI for checking file sizes with compression
- Host: GitHub
- URL: https://github.com/beeequeue/sizer
- Owner: beeequeue
- Created: 2022-03-16T20:42:02.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2025-01-10T22:03:48.000Z (about 1 year ago)
- Last Synced: 2025-01-10T23:18:46.994Z (about 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 797 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Sizer CLI
## Installation
Install it from npm:
```
npm i -g @beequeue/sizer
```
Or (not recommended) download one of the binaries in [the Releases tab](https://github.com/BeeeQueue/sizer/releases).
## Usage
```
Usage: sizer [options]
Arguments:
glob File path glob to analyze
Options:
-V, --version output the version number
-s, --sort Change how files are sorted in the output
(choices: "size-asc", "size-desc", "name-asc", "name-desc", default: "size-desc")
-i, --ignore Glob of files to exclude from output
-B, --brotli Compress using Brotli (slow!)
--json Output in JSON format
-h, --help display help for command
```
Example output
```
❯ sizer dist/**/*.js
Path Size Gzip Diff%
---- ---- ---- -----
dist/assets/vendor.a06e18d4.js 144.79KB 47.58KB -67%
dist/assets/index.2143eba7.js 18.17KB 7.79KB -57%
dist/sw.js 16.24KB 5.6KB -66%
dist/assets/virtual_pwa-register.69ec1145.js 5.81KB 2.42KB -58%
----- ------ ------ ----
Total 185KB 63.38KB -66%
```