1.0.1 • Published 3 years ago

prsize v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

prsize

npm GitHub Workflow Status (branch) npm bundle size npm supports


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):

npx prsize

Alternatively, you can globally install the tool into your commandline:

npm i -g prsize
prsize

The output will look something like this:

Hierarchy              Size (in bytes)      Executable lines       Comment lines        Total lines
----------------------------------------------------------------------------------------------------------------------
<path to the item>     <filesize> [<%>]    <linecount> [<%>]      <linecount> [<%>]    <linecount> [<%>]
...                    ...                 ...                    ...                  ...

Usage

The default usage is to call the tool the following way:

npx prsize [path] [options]

path defaults to the current working directory (.), and you can use the options below to customize the output.

Options

NameDefault ValueDescription
--depth-1How deep to show the tree. Note that regardless of this, the entire project will be scanned. -1 to show the entire tree.
--nodirsfalseWhether to hide directory statistics. Note that the directories themselves will be shown regardless.

License

The project is licensed under a MIT license.