module Middleman::CoreExtensions::FileWatcher::InstanceMethods
def file_changed(*args, &block)
def file_changed(*args, &block) self.class.file_changed(*args, &block) end
def file_deleted(*args)
def file_deleted(*args) self.class.file_deleted(*args) end
def file_did_change(path)
def file_did_change(path) file_changed.each do |callback, matcher| next if path.match(%r{^#{build_dir}/}) next if !matcher.nil? && !path.match(matcher) instance_exec(path, &callback) end end
def file_did_delete(path)
def file_did_delete(path) file_deleted.each do |callback, matcher| next if path.match(%r{^#{build_dir}/}) next unless matcher.nil? || path.match(matcher) instance_exec(path, &callback) end end