Add a way to specify custom reports in the CLI with multiple inputs
Is your feature request related to a problem? Please describe. I'm trying to use the CLI with many stats file (Generated through @vercel/ncc) and have a custom report that goes through the data of all modules. It's possible to create a report using the "Make Report" UI, but not to add it to a configuration file.
Describe the solution you'd like
- Add a way to define reports in the
statoscope.config.js, with the same format as for webpack - Add a button on the "Make Report" UI to export to a valid JSON to easily add to
statoscope.config.js - Make it work for more than one input file (
statoscope inject-reportworks only for a single input)
Describe alternatives you've considered I can save the URL of my report, but that's not a great UX
Additional context I work on a node application, and want to bundle dependencies, that's why I have many stats files.
Thanks for the issue! Pretty cool idea. Will be added
@onigoetz I would like to suggest you a temporary workaround:
- call
statoscope inject-reportfor one stats file - call
statoscope generatefor all of your stats files
For example, imagine that you have a few stats file from @vercel/ncc in a stats directory.
statoscope inject-report --input stats/foo.json --report path/to/my-reports.json > stats/foo.json
statoscope generate --input stats/* -t output.html
Seems like we can close this issue because after #175 we can use --custom-report with the generate command to add some custom reports