Repository is archived
No commit activity in last 3 years
No release in over 3 years
Easy livereloading of assets for Rails.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.8
>= 0
~> 10.0
~> 3.0

Runtime

 Project Readme

LivereloadRails::Rails

Installation

gem "livereload_rails", group: :development

That's it. Your CSS now livereloads. A few notes that could be of interest:

  • requires a threaded webserver, so puma is a runtime dependency for ease of installation.
  • adds middleware Rack:LiveReload which automatically includes livereload.js
  • adds middleware LivereloadRails::Middleware which acts as websocket/livereload server

Development

If you wish to contribute to this gem, here are some notes I hope will help you:

  • bin/setup: run to install development dependencies.
  • bin/console: run to start an interactive console to experiment with the code.
  • rake: run the automated test suite.

Implementation Notes

LivereloadRails::Rails consists of the following parts:

  • Watcher - responsible for watching the asset paths for file changes.
  • WebSocket - websocket server handler for rack.
  • Client - livereload server handler.
  • Middleware - rack middleware to accept websocket connections.
  • Railtie - rails engine to automatically hook rails up with livereload.

Contributing

Contributions are very welcome! Follow these steps:

  1. Fork the code: https://help.github.com/articles/fork-a-repo/
  2. Create a new pull request with your changes: https://help.github.com/articles/using-pull-requests/

It's perfectly fine to create a pull request with your code and continue a discussion from your changes from there.