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/reload_tag.rb,
lib/bun_bun_bundle/dev_cache_middleware.rb
Defined Under Namespace
Modules: HanamiIntegration, Helpers, ReloadTag
Classes: Config, DevCacheMiddleware, Manifest, Railtie
Constant Summary
collapse
- VERSION =
'0.1.0'
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.asset_host ⇒ Object
22
23
24
|
# File 'lib/bun_bun_bundle.rb', line 22
def asset_host
@asset_host || ''
end
|
.config ⇒ Object
14
15
16
|
# File 'lib/bun_bun_bundle.rb', line 14
def config
@config ||= Config.new
end
|
.environment ⇒ Object
26
27
28
|
# File 'lib/bun_bun_bundle.rb', line 26
def environment
@environment || ENV['RACK_ENV'] || ENV['RAILS_ENV'] || 'development'
end
|
.manifest ⇒ Object
18
19
20
|
# File 'lib/bun_bun_bundle.rb', line 18
def manifest
@manifest ||= Manifest.new
end
|
Class Method Details
.bun_path ⇒ Object
Returns the path to the bundled JS files shipped with the gem.
39
40
41
|
# File 'lib/bun_bun_bundle.rb', line 39
def bun_path
File.expand_path('bun', __dir__)
end
|
.development? ⇒ Boolean
30
31
32
|
# File 'lib/bun_bun_bundle.rb', line 30
def development?
environment == 'development'
end
|
.production? ⇒ Boolean
34
35
36
|
# File 'lib/bun_bun_bundle.rb', line 34
def production?
environment == 'production'
end
|
.reset! ⇒ Object
Resets all state. Useful for testing.
44
45
46
47
48
49
|
# File 'lib/bun_bun_bundle.rb', line 44
def reset!
@config = nil
@manifest = nil
@asset_host = nil
@environment = nil
end
|