Module: Jekyll::Watcher
- Defined in:
- lib/starter_web/_plugins/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
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/starter_web/_plugins/symlink_watcher.rb', line 32 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 |