mirror of
https://github.com/zhigang1992/sass.git
synced 2026-04-29 01:35:35 +08:00
Work around guard/listen#243.
This commit is contained in:
@@ -280,7 +280,12 @@ module Sass::Plugin
|
||||
def create_listener(*args, &block)
|
||||
Sass::Util.load_listen!
|
||||
if Sass::Util.listen_geq_2?
|
||||
Listen.to(*args, &block)
|
||||
# Work around guard/listen#243.
|
||||
options = args.pop if args.last.is_a?(Hash)
|
||||
args.map do |dir|
|
||||
p [dir, options]
|
||||
Listen.to(dir, options, &block)
|
||||
end
|
||||
else
|
||||
Listen::Listener.new(*args, &block)
|
||||
end
|
||||
@@ -288,7 +293,7 @@ module Sass::Plugin
|
||||
|
||||
def listen_to(listener)
|
||||
if Sass::Util.listen_geq_2?
|
||||
listener.start.join
|
||||
listener.map {|listener| listener.start}.each {|thread| thread.join}
|
||||
else
|
||||
listener.start!
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user