Skip to content

Latest commit

 

History

History

README.md

@jscpd/html-reporter

HTML reporter for jscpd — generates an interactive HTML report with per-format statistics, a duplication graph, and syntax-highlighted clone diff views.

Output directory: <output-dir>/html/
Entry point: <output-dir>/html/index.html
Raw data: <output-dir>/html/jscpd-report.json

Installation

npm install @jscpd/html-reporter

Usage

jscpd --reporters html --output ./reports /path/to/source

Then open ./reports/html/index.html in a browser.

Programmatic usage

import { IClone, IOptions, IStatistic } from '@jscpd/core';
import HtmlReporter from '@jscpd/html-reporter';

const options: IOptions = { output: './reports' };
const reporter = new HtmlReporter(options);

reporter.report(clones, statistic);
// writes ./reports/html/index.html and ./reports/html/jscpd-report.json

License

MIT © Andrey Kucherenko