Module: Jekyll::Watcher
- Defined in:
- symlink_watcher.rb
Instance Method Summary collapse
- #build_listener_with_symlinks(site, options) ⇒ Object (also: #build_listener)
Instance Method Details
#build_listener_with_symlinks(site, options) ⇒ Object Also known as: build_listener
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'symlink_watcher.rb', line 24 def build_listener_with_symlinks(site, ) src = ["source"] dirs = [src] Find.find(src).each do |f| next if f == "#{src}/_drafts" and not ["show_drafts"] # TODO(willnorris): filter ignored files dirs << f if File.directory?(f) and File.symlink?(f) end require "listen" Listen.to( *dirs, :ignore => listen_ignore_paths(), :force_polling => ['force_polling'], &(listen_handler(site)) ) end |