Module: Railpack
- Includes:
- Hooks
- Defined in:
- lib/railpack.rb,
lib/railpack/hooks.rb,
lib/railpack/config.rb,
lib/railpack/bundler.rb,
lib/railpack/manager.rb,
lib/railpack/railtie.rb,
lib/railpack/version.rb,
lib/railpack/manifest.rb,
lib/railpack/bundlers/bun_bundler.rb,
lib/railpack/bundlers/rollup_bundler.rb,
lib/railpack/bundlers/esbuild_bundler.rb,
lib/railpack/bundlers/webpack_bundler.rb
Defined Under Namespace
Modules: Hooks, Manifest
Classes: BunBundler, Bundler, Config, Error, EsbuildBundler, InstallGenerator, Manager, NpmBasedBundler, Railtie, RollupBundler, WebpackBundler
Constant Summary
collapse
- VERSION =
"1.6.9"
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.logger ⇒ Object
26
27
28
|
# File 'lib/railpack.rb', line 26
def logger
@logger ||= defined?(Rails) && Rails.respond_to?(:logger) && Rails.logger ? Rails.logger : Logger.new($stdout)
end
|
Class Method Details
.config ⇒ Object
30
31
32
|
# File 'lib/railpack.rb', line 30
def config
@config ||= Config.new
end
|
.manager ⇒ Object
40
41
42
|
# File 'lib/railpack.rb', line 40
def manager
@manager ||= Manager.new
end
|
.method_missing(method, *args, &block) ⇒ Object
46
47
48
49
50
51
52
53
54
|
# File 'lib/railpack.rb', line 46
def self.method_missing(method, *args, &block)
if singleton_class.method_defined?(method) || private_method_defined?(method)
send(method, *args, &block)
elsif manager.respond_to?(method)
manager.send(method, *args, &block)
else
super
end
end
|
.reload! ⇒ Object
34
35
36
37
38
|
# File 'lib/railpack.rb', line 34
def reload!
@config = Config.new
Rails.logger.info "🔄 Railpack configuration reloaded" if defined?(Rails) && Rails.logger
true
end
|
.respond_to_missing?(method, include_private = false) ⇒ Boolean
56
57
58
59
60
61
|
# File 'lib/railpack.rb', line 56
def self.respond_to_missing?(method, include_private = false)
singleton_class.method_defined?(method) ||
private_method_defined?(method) ||
manager.respond_to?(method) ||
super
end
|