Hotwire Livereload

screenshot of Hotwire Livereload
rails

Live reload gem for Hotwire Rails apps.

Overview

Hotwire::Livereload is a game-changing tool that automatically reloads your Hotwire Turbo setup whenever app files are modified. This is particularly useful for developers looking to streamline their workflow and reduce the friction that comes with manual reloading. By eliminating the need for constant refreshing, Hotwire::Livereload ensures a smoother and more efficient development process.

Setting up Hotwire::Livereload is straightforward. It requires adding the gem to your Gemfile and configuring a few settings to get the most out of its capabilities. The best part? It watches various predefined folders, so you can focus on coding without worrying about constantly checking for updates.

Features

  • Automatic Reloading: Reload your Hotwire Turbo setup instantly as soon as any app files are modified, enhancing your development efficiency.

  • Configurable Watch Paths: Easily add or skip specific folders to customize which directories Hotwire::Livereload monitors for changes.

  • Force Reload Options: If your bundles lack the necessary reload attributes, the gem can enforce full browser reloads for your JS and CSS files.

  • Flexible Listen Options: Utilize the Listen gem's advanced options, including enabling polling for environments where native file monitoring might not function reliably.

  • Debounce Delay: Manage quick succession changes, such as those from template updates, ensuring reliable reloads without premature reloads during the CSS build process.

  • Easy Disable/Enable: You can quickly disable livereloading for troubleshooting or adjustments without needing a server restart, making it incredibly user-friendly.

  • Straightforward Setup: With minimal setup steps, including running npm commands, developers can get started with this tool in no time.

  • MIT License: The gem is open-source and freely available, encouraging contributions and accessibility for all developers.

rails
Ruby on Rails

Ruby on Rails, often referred to as Rails, is an open-source web application framework written in Ruby. Known for its convention over configuration and don't repeat yourself (DRY) principles, Rails simplifies and accelerates the development of database-backed web applications.