Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: Let user customize json output path #15

Open
1 task done
kindoflew opened this issue Dec 22, 2022 · 0 comments
Open
1 task done

[Feature Request]: Let user customize json output path #15

kindoflew opened this issue Dec 22, 2022 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@kindoflew
Copy link
Contributor

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

  • I agree to follow this project's Code of Conduct
@kindoflew kindoflew added enhancement New feature or request good first issue Good for newcomers labels Dec 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant