https://github.com/rake7h/packsize
package size control on a monorepo
https://github.com/rake7h/packsize
Last synced: 4 months ago
JSON representation
package size control on a monorepo
- Host: GitHub
- URL: https://github.com/rake7h/packsize
- Owner: rake7h
- License: mit
- Created: 2023-01-28T13:35:24.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-02-18T05:42:03.000Z (over 2 years ago)
- Last Synced: 2025-10-09T05:20:13.537Z (8 months ago)
- Language: TypeScript
- Size: 1.2 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Roadmap: ROADMAP.md
Awesome Lists containing this project
README
# Packsize: Monorepo Package Size Stats Tool
## Feature
Packsize offers first-class support for monorepos, providing CLI commands to generate size statistics for all packages within the workspace. It also includes a diff checker to compare size changes between snapshots.
This tool is specifically designed for monorepos, allowing easy monitoring of package sizes across the entire workspace before publishing it.
## Usage
### Installation
```bash
yarn add packsize-cli
```
#### Creating Packsize Configuration
Create a `packsize.config.json` file at the root of your project:
```json
{
"workspaces": [
"packages/*",
"helpers/*",
"other workspaces",
"..."
]
}
```
### CLI
Add the following commands to the `scripts` section of your root `package.json`:
```json
"scripts": {
"packsize:init": "packsize init",
"packsize:diff": "packsize diff",
"packsize:clean": "packsize clean"
}
```
|Command | Description |
|--|--|
| init |Generates the packsize stats snap file for all packages specified in `packsize.config.json`. |
| diff | Compares the current snapshot with the previous one to identify size differences. |
| clean | Removes all snapshot files from the workspaces. |