GithubHelp home page GithubHelp logo

yiliansource / prsize Goto Github PK

View Code? Open in Web Editor NEW
7.0 7.0 0.0 119 KB

A CLI tool to measure JS/TS project sizes.

Home Page: https://www.npmjs.com/package/prsize

License: MIT License

TypeScript 79.10% JavaScript 20.90%
comments projects size

prsize's People

Contributors

yiliansource avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

prsize's Issues

Error is thrown when directory is not a project directory

When running prsize in the terminal in a directory (like the user root in this case) that is not a project folder, prsize throws an error:
image

This can be fixed by error handling and reporting what's wrong in the console, to make the interface more user-friendly.

Add more language parsers

Initially, the idea was to only provide JS/TS support, but with the way that the parser was written it should be easy to add support for more languages.

The following initial languages should be added, and the project should be rebranded as a general file statistics tool:

  • C#
  • C++
  • Python
  • Java

Subsequent language requests should be opened as individual issues. A note in the README should hint at this.

Allow tree formatting for result table

For better readability over the contents of a directory, the tool should offer the option to format the resulting table similarly to the Unix tree command.

Example:

Unix Tree

Due to font limitations, there should also be the option to print it as ASCII-only, or with no tree-formatting at all (indent-only).

Add option to exclude lines containing only enclosing/scope characters

This could be useful to exclude possible filler lines that are not purely empty lines or lines with white space characters, which means a more accurate result in terms of relevant lines of code.

Taking C# as an example, the official coding convention page puts the curly brackets for opening and closing scopes into separate lines, which some might want to exclude from their count of relevant code lines.

Example from the page:

if ((val1 > val2) && (val1 > val3))
{
    // Take appropriate action.
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.