https://github.com/yiliansource/prsize
A CLI tool to measure JS/TS project sizes.
https://github.com/yiliansource/prsize
comments projects size
Last synced: about 1 year ago
JSON representation
A CLI tool to measure JS/TS project sizes.
- Host: GitHub
- URL: https://github.com/yiliansource/prsize
- Owner: yiliansource
- License: mit
- Created: 2021-03-24T09:01:43.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-02-10T14:27:29.000Z (over 2 years ago)
- Last Synced: 2025-04-28T19:18:16.019Z (about 1 year ago)
- Topics: comments, projects, size
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/prsize
- Size: 116 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# prsize





---
This is a tool to quickly measure the size of your coding project, in terms of executable code, code-to-comment proportions and file size. Nothing that actually aids in development - just fun metrics here!
The tool currently supports `.js` and `.ts` files. More to come?
You can easily run the tool via `npx` (bundled with `npm` since 5.2):
```sh
npx prsize
```
Alternatively, you can globally install the tool into your commandline:
```sh
npm i -g prsize
prsize
```
The output will look something like this:
```
Hierarchy Size (in bytes) Executable lines Comment lines Total lines
----------------------------------------------------------------------------------------------------------------------
[<%>] [<%>] [<%>] [<%>]
... ... ... ... ...
```
## Usage
The default usage is to call the tool the following way:
```sh
npx prsize [path] [options]
```
`path` defaults to the current working directory (`.`), and you can use the [options](#options) below to customize the output.
## Options
| Name | Default Value | Description |
| :--------- | :------------ | :------------------------------------------------------------------------------------------------------------------------- |
| `--depth` | `-1` | How deep to show the tree. Note that regardless of this, the entire project will be scanned. `-1` to show the entire tree. |
| `--nodirs` | `false` | Whether to hide directory statistics. Note that the directories themselves will be shown regardless. |
## License
The project is licensed under a [MIT license](./license.md).