phoenixframework / phoenix_live_reload

Provides live-reload functionality for Phoenix
MIT License
317 stars 90 forks source link

Add configuration for reload interval and update readme. #69

Closed jung-hunsoo closed 6 years ago

jung-hunsoo commented 6 years ago

This PR let users to configure the reload interval before triggered on client side.

Main advantage is;

  1. Provides more reliable development by preventing possible compilation conflict on race condition.
  2. User can configure the interval with ease.
  3. And non-critical interactive libraries tend to support custom delay as a buffer purpose; chokidar(https://github.com/paulmillr/chokidar#performance), guard-livereload(https://github.com/guard/guard-livereload#options), node-livereload(https://github.com/napcs/node-livereload#command-line-options), and more.

This PR uses 1000 ms for default interval, but 500 ms would be enough in most cases.

See #68 for detail.

chrismccord commented 6 years ago

Thanks for the PR! Can you elaborate a bit on the needs you have for this? What does the interval (delay) allow you to achieve with respect to compilation conflicts? Also, what kind of conflicts? Thanks!

jung-hunsoo commented 6 years ago

@chrismccord Description updated! Thanks!

josevalim commented 6 years ago

:heart: :green_heart: :blue_heart: :yellow_heart: :purple_heart: