Sha256: 343c8b596e6a595d8c653544de1d77da98a89f9e64bfdd8c97d0838d399ff657

Contents?: true

Size: 578 Bytes

Versions: 1

Compression:

Stored size: 578 Bytes

Contents

class Middleman::Features::LiveReload
  def initialize(app, config)
    return unless Middleman::Server.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::Server.public, Middleman::Server.views], new_config
  end
end

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
middleman-0.99.1.pre lib/middleman/features/livereload.rb