Upgrade the Listen gem

This commit is contained in:
Sam
2017-04-13 10:26:07 -04:00
parent ef093b1610
commit 22214f5e5c
4 changed files with 13 additions and 5 deletions

View File

@ -31,7 +31,7 @@ module Stylesheet
@paths.each do |watch|
Thread.new do
begin
Listen.to("#{root}/#{watch}") do |modified, added, _|
listener = Listen.to("#{root}/#{watch}", ignore: /xxxx/) do |modified, added, _|
paths = [modified, added].flatten
paths.compact!
paths.map!{|long| long[(root.length+1)..-1]}
@ -40,6 +40,8 @@ module Stylesheet
rescue => e
STDERR.puts "Failed to listen for CSS changes at: #{watch}\n#{e}"
end
listener.start
sleep
end
end
end