Socket
Socket
Sign inDemoInstall

prsize

Package Overview
Dependencies
13
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    prsize

A CLI tool to measure JS/TS project sizes.


Version published
Weekly downloads
1
Maintainers
1
Install size
319 kB
Created
Weekly downloads
 

Readme

Source

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.

Keywords

FAQs

Last updated on 24 Mar 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc