Created
January 2, 2014 06:34
-
-
Save syahrasi/8215725 to your computer and use it in GitHub Desktop.
Rack-livereload with Sinatra
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "rubygems" | |
require "bundler" | |
Bundler.require | |
require 'rack-livereload' | |
use Rack::LiveReload | |
require "./app" | |
run Sinatra::Application | |
// run 'guard' after this |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
group :development, :test do | |
gem "guard-livereload" | |
gem "rack-livereload" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
guard 'livereload' do | |
watch(%r{^app\.rb}) | |
watch(%r{views/.+\.(erb|haml|slim)$}) | |
watch(%r{public/.+\.(css|js|html)}) | |
end | |
// to generate this file, run: guard init livereload |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment