*general excitement*
Another one of my little tangent side quests here. I'll admit I had to do a little digging to figure this one out. It has no real purpose other than it's awesome and I had fun doing it. You may like it too.
When you run rails routes, you get a swath of white text in your terminal that isn't all that fun to look at. Additionally, it often will run on to the next line and it's a little haphazard feeling unless you zoom way out and then make your terminal gigantic. Can't have that. It has to be fun. (Or you know, stylized to your taste, 10 shades of whatever your brand is.) XD
Turn this:
Into this:
So I messed around a bit...
Ok, things are happening. You can easily add structure by calling rails routes --expanded
Now were cooking with fire.
If this can be done, it means I can break it apart and put colors in places I want them. Excellent.
Lets take one part of the route, lets say the path for example. We can make a color array to loop over the characters.
This is totally my vibe.
But can it be useful?
How about we highlight the verbs and slap the controller below it so it's not so squished in the terminal.
Now we can find the routes a bit easier with verb highlighting. Perf.
The point here is, you can tweak it, and it can be sort of helpful.
If you are interested in poking around with this, my rake file can be found here: Rainbow Routes
Thanks for looking!
I'd like to hear everyones 2 cents on the matter. Does anyone else do this? π€£
Top comments (1)
Not gonna lie I did find that pretty cool! Thanks for sharing Anna!