Sha256: 59a85c362711c0c622d4bb5cf1e2035184039cd2b2a0ce4142da8767f42bb2ee

Contents?: true

Size: 763 Bytes

Versions: 5

Compression:

Stored size: 763 Bytes

Contents

require 'rubygems'
require 'fssm'

module Emberprecompile
    class Watcher
        def self.watch
            source = "views/"
            FSSM.monitor(source) do 
                update do |b, r|
                    print "Change detected in >>>> " + r + "\n\n"
                    Emberprecompile::Compiler.compile
                end
                
                create do |b, r|
                    print "Created >>>> " + r + "\n\n"
                    Emberprecompile::Compiler.compile
                end
                
                delete do |b, r|
                    print "Deleted >>>> " + r + "\n\n"
                    Emberprecompile::Compiler.compile
                end
            end
        end
    end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
emberprecompile-0.1.3 lib/emberprecompile/watcher.rb
emberprecompile-0.1.2 lib/emberprecompile/watcher.rb
emberprecompile-0.1.1a lib/emberprecompile/watcher.rb
emberprecompile-0.1.1 lib/emberprecompile/watcher.rb
emberprecompile-0.1.0 lib/emberprecompile/watcher.rb