0.0.3 • Published 4 years ago

complexity-report-html v0.0.3

Weekly downloads
79
License
ISC
Repository
github
Last release
4 years ago

Motivation

Either you are counting your first days in a new JavaScript codebase, or you are trying to get a hold of existing tech-debt, surely visualizing it will be of use.

  1. Install the library
  2. Generate the report and find it under .complexity_report
  3. Get a bird's eye view of what are the rough spots in the codebase
  4. *It is plain HTML so you can just share this file with anyone that has a browser

Installation

Use npm or yarn to install the reporter

$ npm install --save-dev complexity-report-html

Usage

*By default the report runs for all JavaScript files under <project_dir>/src

Most of the times you want to add the complexity report, either as an npm-script or a hook after you commit/push something on your repo using husky 🐶.

{
  "scripts": {
    "reveal-hell": "complexity-report-html",
    "...": "..."
  }
}

Or if you prefer npx From the root of your repo, just type

npx complexity-report-html

Now you can see a new folder generated under .complexity_report which includes your report file.

Targeting source folders

If you want to run the report on a different folder, you can use the generate command with a relative folder path:

npx complexity-report-html generate ./directory/to/run

Contributing

For now the best way to contribute is requesting some new features that would make your life easier! Just open a Pull Request and let's discuss.

License

License: ISC

refer to LICENSE file in this repository.