bcardiff / crystal-fswatch

MIT License
16 stars 2 forks source link

Added the event list to README #2

Closed paulocoghi closed 2 years ago

paulocoghi commented 2 years ago

I added the list of events to the README.

Thanks for your library!

paulocoghi commented 2 years ago

I plan to use this shard on a fully open source web development platform my company is creating, that will include a local static web server, a file watcher, a bundled JS runtime, the RollupJS library and, finally, our own JS front-end framework.

Everything in just one small binary. No NodeJS.

In the near future, I plan to expand this platform with back-end development as well, with a new Crystal framework our team is planning, making the platform full-stack (but one could freely choose to develop just a back-end app or a front-end one on each new project).

bcardiff commented 2 years ago

Hi @paulocoghi, Thanks for the kind words 💙 .

Regarding this PR, I would like to understand where you needed that list to consult. Either a small sample in the readme, or putting the list as part of the documentation of the method might be more suitable I think. The listed events match https://github.com/bcardiff/crystal-fswatch/blob/04aca8703e22fb0ed3d7a39316a49bc0e30eefba/src/lib_fswatch.cr#L8-L24 and I guess you was looking for some clarification for the valid value of FSWatch.event_flag_by_name, am I right? If that is so, maybe it's better to document that method instead of changing the README. WDYT?

I'm glad you are finding this shard useful! An I'm looking forward for the things you might develop. You might find https://github.com/bcardiff/live_reload.cr useful also, maybe.

paulocoghi commented 2 years ago

I was just looking to which event values I could expect on the main library method FSWatch.watch.

But maybe I was too hasty with this PR, because the goal was just to make the library easier to understand for new users.

Thinking a little bit, I believe you are right on your observations and this PR is not necessary.

paulocoghi commented 2 years ago

About your Crystal implementation of the live-reload standard, I have just one word: wow! I will certainly use it!

I have implemented such functionality before (not in Crystal, but in NodeJS), but I wasn't aware of the protocol standard.

I wish to learn Crystal more, to be able to contribute to your projects!