Reporters

Badge Reporter

Generate SVG badges for your README.

Installation

npm install @jscpd/badge-reporter

Usage

jscpd --reporters badge ./src

Output

Generates an SVG badge showing duplication percentage:

Adding to README

After generating the badge:

![jscpd](./report/jscpd-badge.svg)

Configuration

.jscpd.json
{
  "reporters": ["badge", "console"],
  "output": "./badges"
}