Sha256: cc632a42599f43d896991ee91bbf4f30f7506476e5ba4785b053ada7a901ff42

Contents?: true

Size: 564 Bytes

Versions: 2

Compression:

Stored size: 564 Bytes

Contents

class Middleman::Features::LiveReload
  def initialize(app)
    return unless Middleman::Base.environment == :development
    
    begin
      require 'livereload'
    rescue LoadError
      puts "Livereload not available. Install it with: gem install livereload"
    end
  
    new_config = ::LiveReload::Config.new do |config|
      config.exts = %w(haml sass scss coffee less builder)
    end
  
    ::LiveReload.run [Middleman::Base.public, Middleman::Base.views], new_config
  end
end

Middleman::Features.register :livereload, Middleman::Features::LiveReload

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
middleman-0.99.0.pre lib/middleman/features/livereload.rb
middleman-0.9.0.pre lib/middleman/features/livereload.rb