Simple interactive graphs that drive change
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.
- Install the library
- Generate the report and find it under .complexity_report
- Get a bird's eye view of what are the rough spots in the codebase
- *It is plain HTML so you can just share this file with anyone that has a browser
Use npm
or yarn
to install the reporter
$ npm install --save-dev complexity-report-html
*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.
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
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.
refer to LICENSE
file in this repository.