Module: Frails
- Extended by:
- Frails
- Included in:
- Frails
- Defined in:
- lib/frails.rb,
lib/frails/utils.rb,
lib/frails/version.rb,
lib/frails/log_subscriber.rb,
lib/frails/component/test_helpers.rb,
lib/frails/monkey/action_view/renderer.rb,
lib/frails/monkey/action_view/partial_renderer.rb,
lib/frails/monkey/action_view/abstract_renderer.rb,
lib/frails/monkey/action_view/template_renderer.rb
Defined Under Namespace
Modules: Component, Helper, Monkey, SideLoadAssets, Utils
Classes: DevServer, DevServerProxy, Engine, LogSubscriber, Manifest, ManifestManager
Constant Summary
collapse
- VERSION =
'0.8.2'
- @@public_output_path =
'assets'
- @@manifest_path =
'manifest.json'
- @@dev_server_host =
'localhost'
- @@dev_server_port =
8080
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.setup {|_self| ... } ⇒ Object
34
35
36
|
# File 'lib/frails.rb', line 34
def self.setup
yield self
end
|
Instance Method Details
#components_path ⇒ Object
51
52
53
|
# File 'lib/frails.rb', line 51
def components_path
@components_path ||= Rails.root.join('app', 'components')
end
|
#config ⇒ Object
38
39
40
41
42
43
44
45
|
# File 'lib/frails.rb', line 38
def config
{
public_output_path: @@public_output_path,
dev_server_host: @@dev_server_host,
dev_server_port: @@dev_server_port,
manifest_path: @@manifest_path
}
end
|
#config_as_json ⇒ Object
47
48
49
|
# File 'lib/frails.rb', line 47
def config_as_json
config.merge({ rails_env: Rails.env }).transform_keys { |key| key.to_s.camelize :lower }.to_json
end
|
#dev_server ⇒ Object
10
11
12
|
# File 'lib/frails.rb', line 10
def dev_server
@dev_server ||= Frails::DevServer.new
end
|