Hey! I did my own (spooky) approach,
it uses a library called directory_watcher (it's only one class
really) and then you can call the script from a Rake task, the
performance is terrible :)
sweet that you include this function to automate the building in the
next release
rote is overkill for me, too complex
here is the code, it works for me!
--------------------------------------------------------
require 'rubygems'
require 'directory_watcher'
dw = DirectoryWatcher.new('.', :glob => 'src/**/*.
{haml,sass}', :pre_load => true)
dw.interval = 0.1
build = 0
dw.add_observer do |*args|
args.each do |event|
if event.type == :modified
puts ">> build number #{build}"
system('staticmatic build .')
puts ">> done"
build += 1
end
end
end
dw.start
puts "=============================================="
puts " Autobuilder running, press <Enter> to stop "
puts "=============================================="
gets # when the user hits "enter" the script will terminate
dw.stop
puts ">> process stopped"
On Jun 3, 8:46 pm, Stephen Bartholomew <[EMAIL PROTECTED]> wrote:
> Hey,
>
> That's exactly what I'm working on at the moment. The next release
> (any day now!) will have a live preview server that will update as
> you code. When you're done, you can just build the site.
>
> Steve
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Haml" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---