Stats report reporter for @statoscope/stats-validator
npm install @statoscope/stats-validator-reporter-stats-report

UI reporter for @statoscope/stats-validator.
Injects validator's result into stats and generates a Statoscope report.
1. Install
npm i -D @statoscope/stats-validator-plugin-webpack
2. Add into statoscope.config.js
``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.
`ts`
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)
};
statoscope.config.js:
`json`
{
"validate": {
"reporters": [["@statoscope/stats-report", { "open": true }]]
}
}
Generate UI report and open it.
statoscope.config.js:
`json`
{
"validate": {
"reporters": [["@statoscope/stats-report", { "saveStatsTo": "/path/to/report.html" }]]
}
}
Generate UI report info /path/to/report.html file.
statoscope.config.js:
`json`
{
"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.