ionide / Fornax

Scriptable static site generator using type safe F# DSL to define page templates.
MIT License
241 stars 44 forks source link

Live refresh #29

Closed NatElkins closed 4 years ago

NatElkins commented 4 years ago

This adds live refresh to the fornax watch command. It can be disabled via fornax watch --disable-live-refresh.

fornax_600

Sorry the gif is so tiny, it's the biggest one I could upload.

How to test:

  1. Clone repo
  2. cd src/Fornax
  3. ./resetTool.sh
  4. mkdir test
  5. cd test
  6. fornax new
  7. fornax watch
  8. Wait until it says it's done, then navigate to http://localhost:8080/ .
  9. Make a change to one of the *.md files.
  10. See the page reload in your browser.

There's only one annoying thing left, it's not really a big deal but I'm not sure how to get rid of it. When the page reloads, Suave outputs the following message:

image

I'm sure there's a way to get rid of it, I'm just not sure how.

Let me know if any changes should be made.

Krzysztof-Cieslak commented 4 years ago

Hey @NatElkins, sorry for delay. This looks good to me in general.

Can you rebase it to latest master?

NatElkins commented 4 years ago

@Krzysztof-Cieslak This is now rebased to master, and I've verified that the exit code changes are functioning as expected.

That WebSocket error log message is still there, although it doesn't affect the functionality at all. Is it fine for it to be there?

Krzysztof-Cieslak commented 4 years ago

Yeah, don't worry about the log messages, it's not critical.

Thanks a lot, it looks amazing ❤️