Skip to content

Commit

Permalink
Replace LiveReload with live.js.
Browse files Browse the repository at this point in the history
  • Loading branch information
mdub committed Jun 23, 2013
1 parent 7cc7af3 commit 68bdfa3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions bin/pith
Expand Up @@ -48,10 +48,10 @@ class PithCommand < Clamp::Command

subcommand "serve", "Serve the generated website" do

option ["-L", "--live-reload"], :flag, "integrate LiveReload"
option ["-L", "--live"], :flag, "automatically reload changes"

def execute
serve(:live_reload => live_reload?)
serve(:auto_reload => live?)
end

end
Expand Down
5 changes: 2 additions & 3 deletions lib/pith/server.rb
@@ -1,6 +1,6 @@
require "pathname"
require "rack"
require "rack-livereload"
require "rack/livejs"
require "thread"

module Pith
Expand All @@ -9,10 +9,9 @@ module Server

def new(project, options = {})
Rack::Builder.new do
use Rack::CommonLogger
use Rack::ShowExceptions
use Rack::Lint
use Rack::LiveReload if options[:live_reload]
use Rack::Livejs if options[:auto_reload]
use Pith::Server::OutputFinder, project
run Rack::Directory.new(project.output_dir)
end
Expand Down
2 changes: 1 addition & 1 deletion pith.gemspec
Expand Up @@ -21,7 +21,7 @@ Gem::Specification.new do |gem|
gem.add_runtime_dependency("rack", ">= 1.2.1")
gem.add_runtime_dependency("thin", ">= 1.2.7")
gem.add_runtime_dependency("clamp", ">= 0.3.0")
gem.add_runtime_dependency("rack-livereload", ">= 0.3.14")
gem.add_runtime_dependency("rack-livejs", ">= 0.2.0")

gem.require_path = "lib"
gem.files = Dir["lib/**/*", "sample/**/*", "README.markdown", "LICENSE"]
Expand Down

0 comments on commit 68bdfa3

Please sign in to comment.