@statoscope/stats-validator-reporter-stats-report
v5.29.0
Published
Stats report reporter for @statoscope/stats-validator
Readme
stats-validator-reporter-stats-report
UI reporter for @statoscope/stats-validator.
Injects validator's result into stats and generates a Statoscope report.
Usage
Install
npm i -D @statoscope/stats-validator-plugin-webpackAdd into
statoscope.config.jsmodule.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.
