reaganmcf / lightmon

A lightweight, cross-platform, language-agnostic "run code on file change" tool, inspired by Nodemon
GNU General Public License v3.0
15 stars 2 forks source link

Big refactor and various improvements #39

Open reaganmcf opened 3 years ago

reaganmcf commented 3 years ago

Since I haven't worked on this project in a while, I have learned a lot about Rust in the meantime. Going back over this codebase I see lots of bad practices and better ways to do things.

However, I'm not changing any variable names yet or any architectural changes, just refactoring where it is trivial. Also, I am removing logging since we don't need anything that intense, and print statements are more than enough for this application.

Lastly, this patch also is meant to close #1, since I did implement colored output and better output messages. Below is a screenshot

Screen Shot 2021-07-19 at 10 52 27 PM
reaganmcf commented 3 years ago

@alayshahh No idea why the windows stuff isn't working - going to fix that later. But, if you could review the rest of the patch that would be appreciated 👍🏻

reaganmcf commented 3 years ago

I'm gonna take a look through https://github.com/nushell/nushell to see how they do it. They support all platforms and get colored output with no issues, by maintaining a modified version of ansi_term called nu_ansi_term