Created
April 16, 2010 04:04
-
-
Save jacquescrocker/367989 to your computer and use it in GitHub Desktop.
use this with webby (in your Sitefile). Replaces `webby autobuild`
This file contains hidden or 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
# add this to your Sitefile | |
desc "an autobuild that doesnt suck" | |
task :watchr => [:rebuild] do | |
watch_script = %% | |
def rebuild | |
puts system("webby rebuild") | |
puts "DONE REBUILDING!" | |
end | |
watch("lib/") { rebuild } | |
watch("content/") { rebuild } | |
watch("layouts/") { rebuild } | |
watch("templates/") { rebuild } | |
% | |
File.open(".autowatchr", 'w') {|f| f.write(watch_script) } | |
require "rubygems" | |
require "watchr" | |
puts "Setting up Watchr..." | |
Watchr::Controller.new(Watchr::Script.new(Pathname.new('.autowatchr')), Watchr.handler.new).run | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment