Module: Jsimple
- Defined in:
- lib/jsimple.rb,
lib/jsimple/builder.rb,
lib/jsimple/railtie.rb,
lib/jsimple/version.rb,
lib/jsimple/rails_view_helper.rb
Defined Under Namespace
Modules: RailsViewHelper
Classes: Builder, JsimpleRailtie
Constant Summary
collapse
- DEFAULT_HOST =
'localhost'
- DEFAULT_PORT =
'3100'
- DEFAULT_DEVELOPMENT =
defined?(Rails) ? Rails.env.development? : false
- DEFAULT_JS_START_COMMAND =
'start'
- DEFAULT_JS_PATH_PREFIX =
'jsimple'
- DEFAULT_JS_DEV_PATH_PREFIX =
''
- VERSION =
'0.5.0'
Class Method Summary
collapse
Class Method Details
.app(name, props: {}, id: nil) ⇒ Object
9
10
11
|
# File 'lib/jsimple.rb', line 9
def self.app(name, props: {}, id: nil)
Builder.app_factory(name, props, id)
end
|
.development ⇒ Object
69
70
71
|
# File 'lib/jsimple.rb', line 69
def self.development
@development
end
|
.development=(development) ⇒ Object
45
46
47
|
# File 'lib/jsimple.rb', line 45
def self.development=(development)
@development = development
end
|
.host ⇒ Object
61
62
63
|
# File 'lib/jsimple.rb', line 61
def self.host
@host
end
|
.host=(host) ⇒ Object
35
36
37
38
|
# File 'lib/jsimple.rb', line 35
def self.host=(host)
HotReloadProxy::Config.host = host
@host = host
end
|
.init(*args) ⇒ Object
17
18
19
|
# File 'lib/jsimple.rb', line 17
def self.init(*args)
app(*args).init
end
|
.js_dev_path_prefix ⇒ Object
81
82
83
|
# File 'lib/jsimple.rb', line 81
def self.js_dev_path_prefix
@js_dev_path_prefix
end
|
.js_dev_path_prefix=(js_dev_path_prefix) ⇒ Object
57
58
59
|
# File 'lib/jsimple.rb', line 57
def self.js_dev_path_prefix=(js_dev_path_prefix)
@js_dev_path_prefix = js_dev_path_prefix
end
|
.js_path_prefix ⇒ Object
77
78
79
|
# File 'lib/jsimple.rb', line 77
def self.js_path_prefix
@js_path_prefix
end
|
.js_path_prefix=(js_path_prefix) ⇒ Object
53
54
55
|
# File 'lib/jsimple.rb', line 53
def self.js_path_prefix=(js_path_prefix)
@js_path_prefix = js_path_prefix
end
|
.js_start_command ⇒ Object
73
74
75
|
# File 'lib/jsimple.rb', line 73
def self.js_start_command
@js_start_command
end
|
.js_start_command=(js_start_command) ⇒ Object
49
50
51
|
# File 'lib/jsimple.rb', line 49
def self.js_start_command=(js_start_command)
@js_start_command = js_start_command
end
|
.path(*args) ⇒ Object
13
14
15
|
# File 'lib/jsimple.rb', line 13
def self.path(*args)
app(*args).path
end
|
.port ⇒ Object
65
66
67
|
# File 'lib/jsimple.rb', line 65
def self.port
@port
end
|
.port=(port) ⇒ Object
40
41
42
43
|
# File 'lib/jsimple.rb', line 40
def self.port=(port)
HotReloadProxy::Config.port = port
@port = port
end
|
.reset! ⇒ Object
85
86
87
88
89
90
91
92
|
# File 'lib/jsimple.rb', line 85
def self.reset!
@host = DEFAULT_HOST
@port = DEFAULT_PORT
@development = DEFAULT_DEVELOPMENT
@js_start_command = DEFAULT_JS_START_COMMAND
@js_path_prefix = DEFAULT_JS_PATH_PREFIX
@js_dev_path_prefix = DEFAULT_JS_DEV_PATH_PREFIX
end
|