@statoscope/stats-validator-reporter-stats-report
TypeScript icon, indicating that this package has built-in type declarations

5.28.2 • Public • Published

stats-validator-reporter-stats-report

npm version Financial Contributors on Open Collective

UI reporter for @statoscope/stats-validator.

Injects validator's result into stats and generates a Statoscope report.

Usage

  1. Install

    npm i -D @statoscope/stats-validator-plugin-webpack

  2. Add into statoscope.config.js

    module.exports = {
      validate: {
        reporters: [["@statoscope/stats-report", { "open": true }]]
        // any other config parts
      }
    }   

In this case, Statoscope validator will generate a UI-report and open it.

Options

type Options = {
  saveReportTo?: string; // a path to save HTML report (temporary dir with random file name by default)
  saveStatsTo?: string; // a path to save JSON stats (does not save stats by default)
  open?: boolean; // open generated Statoscope report (false by default)
  disableReportCompression?: boolean // html report data compression, disable it will increase the size a lot (false by default)
};

Examples

statoscope.config.js:

{
  "validate": {
    "reporters": [["@statoscope/stats-report", { "open": true }]]
  }
}

Generate UI report and open it.

statoscope.config.js:

{
  "validate": {
    "reporters": [["@statoscope/stats-report", { "saveStatsTo": "/path/to/report.html" }]]
  }
}

Generate UI report info /path/to/report.html file.

statoscope.config.js:

{
  "validate": {
    "reporters": [["@statoscope/stats-report", { "saveStatsTo": "/path/to/new/stats.json" }]]
  }
}

Just inject validation result into stats and save into /path/to/new/stats.json file.

Readme

Keywords

none

Package Sidebar

Install

npm i @statoscope/stats-validator-reporter-stats-report

Weekly Downloads

8,210

Version

5.28.2

License

MIT

Unpacked Size

10.2 kB

Total Files

5

Last publish

Collaborators

  • smelukov