[Docs] rake watch now rebuilds stylesheets independently from docs content so doc styling is faster
This commit is contained in:
parent
46b7343b80
commit
6bbbb94bfa
@ -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 <<<"
|
||||
|
Loading…
Reference in New Issue
Block a user