Sha256: 69d07887f32ccc22374ca86d6697b964c0b5acb55d5f7e0f899e336a52aaf99c

Contents?: true

Size: 419 Bytes

Versions: 20

Compression:

Stored size: 419 Bytes

Contents

class Importmap::Reloader
  delegate :execute_if_updated, :execute, :updated?, to: :updater

  def reload!
    import_map_paths.each { |path| Rails.application.importmap.draw(path) }
  end

  private
    def updater
      @updater ||= config.file_watcher.new(import_map_paths) { reload! }
    end

    def import_map_paths
      config.importmap.paths
    end

    def config
      Rails.application.config
    end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
importmap-rails-1.2.2 lib/importmap/reloader.rb
importmap-rails-1.2.1 lib/importmap/reloader.rb
importmap-rails-1.2.0 lib/importmap/reloader.rb
importmap-rails-1.1.6 lib/importmap/reloader.rb
importmap-rails-1.1.5 lib/importmap/reloader.rb
importmap-rails-1.1.4 lib/importmap/reloader.rb
importmap-rails-1.1.3 lib/importmap/reloader.rb
importmap-rails-1.1.2 lib/importmap/reloader.rb
importmap-rails-1.1.1 lib/importmap/reloader.rb
importmap-rails-1.1.0 lib/importmap/reloader.rb
importmap-rails-1.0.3 lib/importmap/reloader.rb
importmap-rails-1.0.2 lib/importmap/reloader.rb
importmap-rails-1.0.1 lib/importmap/reloader.rb
importmap-rails-1.0.0 lib/importmap/reloader.rb
importmap-rails-0.9.5 lib/importmap/reloader.rb
importmap-rails-0.9.4 lib/importmap/reloader.rb
importmap-rails-0.9.3 lib/importmap/reloader.rb
importmap-rails-0.9.2 lib/importmap/reloader.rb
importmap-rails-0.9.1 lib/importmap/reloader.rb
importmap-rails-0.9.0 lib/importmap/reloader.rb