Skip to content

Commit 4c67080

Browse files
committed
Introduce live reloading views for development
1 parent 14e673b commit 4c67080

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ group :development, :test do
5555
end
5656

5757
group :development do
58+
gem "hotwire-livereload"
5859
# Use console on exceptions pages [https://github.com/rails/web-console]
5960
gem "web-console"
6061
end

Gemfile.lock

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,23 @@ GEM
116116
factory_bot_rails (6.4.4)
117117
factory_bot (~> 6.5)
118118
railties (>= 5.0.0)
119+
ffi (1.17.1-aarch64-linux-gnu)
120+
ffi (1.17.1-aarch64-linux-musl)
121+
ffi (1.17.1-arm-linux-gnu)
122+
ffi (1.17.1-arm-linux-musl)
123+
ffi (1.17.1-arm64-darwin)
124+
ffi (1.17.1-x86_64-darwin)
125+
ffi (1.17.1-x86_64-linux-gnu)
126+
ffi (1.17.1-x86_64-linux-musl)
119127
fugit (1.11.1)
120128
et-orbi (~> 1, >= 1.2.11)
121129
raabro (~> 1.4)
122130
globalid (1.2.1)
123131
activesupport (>= 6.1)
132+
hotwire-livereload (2.0.0)
133+
actioncable (>= 7.0.0)
134+
listen (>= 3.0.0)
135+
railties (>= 7.0.0)
124136
i18n (1.14.7)
125137
concurrent-ruby (~> 1.0)
126138
importmap-rails (2.1.0)
@@ -148,6 +160,9 @@ GEM
148160
thor (~> 1.3)
149161
zeitwerk (>= 2.6.18, < 3.0)
150162
language_server-protocol (3.17.0.4)
163+
listen (3.9.0)
164+
rb-fsevent (~> 0.10, >= 0.10.3)
165+
rb-inotify (~> 0.9, >= 0.9.10)
151166
logger (1.6.5)
152167
loofah (2.24.0)
153168
crass (~> 1.0.2)
@@ -253,6 +268,9 @@ GEM
253268
zeitwerk (~> 2.6)
254269
rainbow (3.1.1)
255270
rake (13.2.1)
271+
rb-fsevent (0.11.2)
272+
rb-inotify (0.11.1)
273+
ffi (~> 1.0)
256274
rdoc (6.11.0)
257275
psych (>= 4.0.0)
258276
regexp_parser (2.10.0)
@@ -390,6 +408,7 @@ DEPENDENCIES
390408
capybara
391409
debug
392410
factory_bot_rails
411+
hotwire-livereload
393412
importmap-rails
394413
jbuilder
395414
kamal

app/views/layouts/application.html.erb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
<link rel="apple-touch-icon" href="/icon.png">
1919

2020
<%# Includes all stylesheet files in app/assets/stylesheets %>
21+
<%= stylesheet_link_tag :app, "data-turbo-track": Rails.env.production? ? "reload" : "" %>
22+
<%= javascript_importmap_tags %>
23+
2124
<meta charset="UTF-8">
2225
<meta name="viewport" content="width=device-width, initial-scale=1.0">
2326
<title>SkillRx</title>

0 commit comments

Comments
 (0)