depngn
depngn copied to clipboard
[Feature Request]: Let user customize `json` output path
Describe your request
Currently, the json reporter option always writes to compat.json in the directory where the CLI was called. We should add some kind of --jsonPath option that takes a string that is a custom filename or path.
Possible Implementation
It's actually kind of already set up for this -- the createJson function (src/cli/reporter/json.ts) already takes a path argument that defaults to compat.json. I just never exposed the API to the world 😅.
We would just need to add it to the options in src/cli/parse.ts and then pass it to createReport (src/cli/index.ts).
Bonus points if we use Node's path module to let the user specify a different directory as well!
Code of Conduct
- [X] I agree to follow this project's Code of Conduct