Sha256: fb824267e10c8c097be859d995ab60aff57cc664f1e6801f0f5873dd7437593e
Contents?: true
Size: 741 Bytes
Versions: 13
Compression:
Stored size: 741 Bytes
Contents
module RevealCK module Commands # The idea of listening for file system changes that indicate its # time to tell browsers to reload. class ListenToReloadBrowser attr_reader :prefix def initialize(ui) @prefix = ui.prefix_for(:reload) end def run sleeping_guard = setup_and_run_guard ThreadWaker.new(sleeping_guard).run sleeping_guard end private def setup_and_run_guard require 'guard/cli' Guard::UI.options[:template] = "#{prefix} :message" guardfile = RevealCK.path('files/reveal-ck/Guardfile') Thread.new do Guard.start(guardfile: guardfile, no_interactions: true) end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems