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

Add format flag to lucky routes for outputting alternate formats #1852

Open
jwoertink opened this issue Feb 23, 2024 · 2 comments
Open

Add format flag to lucky routes for outputting alternate formats #1852

jwoertink opened this issue Feb 23, 2024 · 2 comments
Labels
hacktoberfest Valid Issue for Hacktoberfest

Comments

@jwoertink
Copy link
Member

We currently have some nice output when you run lucky routes

image

I've been working with front end APIs a lot lately, and just had the idea of what if you could do something like lucky routes --format=json then have a json file that maps all of these routes. Drop that file in to your SPA and somehow hook it up in a way that if a route changes on the backend, it would be updated on the frontend.

The use case could be for whatever really, but just having an alternate format option might be nice.

@jwoertink jwoertink added the hacktoberfest Valid Issue for Hacktoberfest label Sep 30, 2024
@JadeKharats
Copy link

Hi,
I would like to take care of this issue.

Does the JSON output need to be noise-free in order to be output to a file? (ex: lucky routes --format=json > routes.json)

I can also provide a --quiet argument for noise-free output and leave the "banner message" when the argument is not present.

I can also add a --output argument to write directly to a file.

What is your opinion?

@jwoertink
Copy link
Member Author

That would be great! My original thought was that it would just push to stdout like it does now, and you could redirect that to a file however you need

lucky routes --format=json 2> routes.json

I guess a few extra flags for output wouldn't be too bad just to make sure it's also windows compatible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest Valid Issue for Hacktoberfest
Projects
None yet
Development

No branches or pull requests

2 participants