Module: BunBunBundle::HanamiIntegration
- Defined in:
- lib/bun_bun_bundle/hanami.rb
Overview
Hanami integration for BunBunBundle.
Add to your Hanami app’s config/app.rb:
require "bun_bun_bundle/hanami"
module MyApp
class App < Hanami::App
config.middleware.use BunBunBundle::DevCacheMiddleware if Hanami.env?(:development)
end
end
Then include helpers in your views:
# app/views/helpers.rb
module MyApp
module Views
module Helpers
include BunBunBundle::Helpers
include BunBunBundle::ReloadTag
end
end
end
Class Method Summary collapse
Class Method Details
.setup(root: Dir.pwd) ⇒ Object
29 30 31 32 33 34 35 36 37 |
# File 'lib/bun_bun_bundle/hanami.rb', line 29 def self.setup(root: Dir.pwd) BunBunBundle.config = Config.load(root: root) BunBunBundle.manifest = if BunBunBundle.development? Manifest.load(root: root) else Manifest.load(root: root, retries: 1, delay: 0) end end |