microsoft / monosize

Bundle size tooling for monorepos
MIT License
25 stars 9 forks source link

An option to create file and write the `compare-report` output for markdownReporter #64

Closed sarmad-abualkaz closed 4 months ago

sarmad-abualkaz commented 4 months ago

Curious if there are any interests in making monosize compare-report take on an option to also create and write output to a local file?

We have a requirement to make our pipeline (and monorepo) OS-agnostic, and were hoping to have monosize create the report file and write the report output in a codified-manner, rather than using some linux utility (e.g. tee or just writing stdout via >).

I already put together a branch that does this (with optional --outputFile argument) and would love to create a PR if that's something you are interested in entertaining/addressing? Let me know.

layershifter commented 4 months ago

We made this change intentionally to behave like other tools in ecosystem (#39). This also makes other reporters consistent as there is a plan to expose API for custom reporters.