[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
|
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 <<<"
|
||||||
|
Loading…
Reference in New Issue
Block a user