[Docs] rake watch now rebuilds stylesheets independently from docs content so doc styling is faster

This commit is contained in:
B Mathis 2010-05-02 14:08:58 -05:00 committed by Chris Eppstein
parent 46b7343b80
commit 6bbbb94bfa

View File

@ -24,10 +24,14 @@ task :watch do
end end
rebuild_site = lambda do |base, relative| rebuild_site = lambda do |base, relative|
if relative if relative && relative =~ /\.s[ac]ss/
puts ">>> Change Detected to #{relative} <<<" puts ">>> Change Detected to #{relative} : updating stylsheets <<<"
system "bundle exec compass compile"
else else
if !relative
puts ">>> Compiling <<<" puts ">>> Compiling <<<"
else
puts ">>> Change Detected to #{relative} <<<"
end end
start = Time.now start = Time.now
# Nanoc3::CLI::Base.new.run(["co"]) # Nanoc3::CLI::Base.new.run(["co"])
@ -43,6 +47,7 @@ task :watch do
`growlnotify -m "Compilation Error!" --image misc/error-icon.png; exit 0` `growlnotify -m "Compilation Error!" --image misc/error-icon.png; exit 0`
end end
end end
end
rebuild_site.call(nil,nil) rebuild_site.call(nil,nil)
puts ">>> Watching for Changes <<<" puts ">>> Watching for Changes <<<"