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