TomasVotruba / lines

CLI tool for quick size measure of PHP project, runs anywhere
https://tomasvotruba.com/blog/easy-and-quick-way-to-measure-lines-of-code-in-php
MIT License
161 stars 4 forks source link

feat: Add `Termwind` to style the `TextOutputFormatter`. #28

Closed xiCO2k closed 1 year ago

xiCO2k commented 1 year ago

Hey,

This PR adds a new style for the TextOutputFormatter using Termwind.

Before

image

After

image

If you like this output but don't like to have the HTML inside the class, I can move that to a view.

Thanks.

TomasVotruba commented 1 year ago

Thank you Francisco, this looks neat and stylish :pray:

If you like this output but don't like to have the HTML inside the class, I can move that to a view.

That would be ideal, so we have the logic and HTML separated :+1:

xiCO2k commented 1 year ago

@TomasVotruba ready!

On the last commit I did remove the TablePrinter and moved the logic to the TextOutputFormatter.

Let me know what do you think.

TomasVotruba commented 1 year ago

Thanks for the updated :+1: , I'll handle it today

Btw, could you update the vendor command as well, so we have the output consistent? :)

https://github.com/TomasVotruba/lines/blob/f9b29d63a3308caf05883054dc728043f0105d7b/src/Console/Command/VendorCommand.php#L70-L91

xiCO2k commented 1 year ago

@TomasVotruba still need more time to have the VendorCommand, will keep you posted.

xiCO2k commented 1 year ago

@TomasVotruba please take a look, I may try to restyle the Progress Bar as well, but want to know your thoughts first.

Thanks.

TomasVotruba commented 1 year ago

Thank you :+1:

Looks good for me :clap: Let's merge it so we can iterate testing in real life. I might adjust it later, but want to ship it now :muscle:

xiCO2k commented 1 year ago

sounds great!

TomasVotruba commented 1 year ago

Btw, I'm curious, how do you use this package? How and when do you need to measure these?

xiCO2k commented 1 year ago

for the ProgressBar I would say I will add a method the Loading class and add a view to handle the styling.

TomasVotruba commented 1 year ago

I mean how do you the lines package and what for

xiCO2k commented 1 year ago

got it 😀.

I'm using it on a couple of a big projects that I'm cleaning up, and thats good to keep track of it

TomasVotruba commented 1 year ago

That's cool 😎 I'm doing something with dripping as much dependencies as I can.

I'd love to see your tricks to remove code :) what's your most effective way?