Module: BunBunBundle
- Defined in:
- lib/bun_bun_bundle.rb,
lib/bun_bun_bundle/config.rb,
lib/bun_bun_bundle/hanami.rb,
lib/bun_bun_bundle/helpers.rb,
lib/bun_bun_bundle/railtie.rb,
lib/bun_bun_bundle/version.rb,
lib/bun_bun_bundle/manifest.rb,
lib/bun_bun_bundle/safe_html.rb,
lib/bun_bun_bundle/reload_tag.rb,
lib/bun_bun_bundle/dev_cache_middleware.rb
Defined Under Namespace
Modules: HanamiIntegration, Helpers, ReloadTag, SafeHtml
Classes: Config, DevCacheMiddleware, Manifest, Railtie
Constant Summary
collapse
- VERSION =
'0.1.1'
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.asset_host ⇒ Object
23
24
25
|
# File 'lib/bun_bun_bundle.rb', line 23
def asset_host
@asset_host || ''
end
|
.config ⇒ Object
15
16
17
|
# File 'lib/bun_bun_bundle.rb', line 15
def config
@config ||= Config.new
end
|
.environment ⇒ Object
27
28
29
|
# File 'lib/bun_bun_bundle.rb', line 27
def environment
@environment || ENV['RACK_ENV'] || ENV['RAILS_ENV'] || 'development'
end
|
.manifest ⇒ Object
19
20
21
|
# File 'lib/bun_bun_bundle.rb', line 19
def manifest
@manifest ||= Manifest.new
end
|
Class Method Details
.bun_path ⇒ Object
Returns the path to the bundled JS files shipped with the gem.
40
41
42
|
# File 'lib/bun_bun_bundle.rb', line 40
def bun_path
File.expand_path('bun', __dir__)
end
|
.development? ⇒ Boolean
31
32
33
|
# File 'lib/bun_bun_bundle.rb', line 31
def development?
environment == 'development'
end
|
.production? ⇒ Boolean
35
36
37
|
# File 'lib/bun_bun_bundle.rb', line 35
def production?
environment == 'production'
end
|
.reset! ⇒ Object
Resets all state. Useful for testing.
45
46
47
48
49
50
|
# File 'lib/bun_bun_bundle.rb', line 45
def reset!
@config = nil
@manifest = nil
@asset_host = nil
@environment = nil
end
|