hotwire-livereload 1.4.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 04b3a325fa089d62215f26cf3fbac951e3ac91d0b03af7aed02fa2a49075969e
4
- data.tar.gz: 24e7339a71da29f35b1930f95f18f0c035aa0221b411fe4a58f27d10384dbb76
3
+ metadata.gz: 2b5dd2e4b13e486c62e47c32d92d240af12c04d7f983644e9484a90caf30d11e
4
+ data.tar.gz: ac774b56a8de9e8f25f0dbf126d3a0b100e1159f8053ae39fd9d9469fdff47a4
5
5
  SHA512:
6
- metadata.gz: 01e7cc071040c5fbafa3fac11adcdfff171695a82c6d6d90db06c8d2010032beb4172ae667b029512737c0afb79c005bcd2e54084661ff662bbae28157087a68
7
- data.tar.gz: 41e86aa960b2796d65aa26e1d8034a819e5ecdfea578b5995e275f713d666f9b4ffd6a9c6337a6bf17834394ac194382aa2ddf9ff74843fb0f7644ed20bfd2fa
6
+ metadata.gz: 13981c03a4c39b8f7ad8e3fb65dbafa038ad7dae8511d42951fcb2d81769f7c5d16be3626466bf5c371fcec365fcb6b1c9e2681d7e98f56c30f237f9473c51ed
7
+ data.tar.gz: e44f93cebac1228be1fdbc3966a8decc6b6ca4954e85c380b355a88a93deba38b656fc7cc4db5a3b568ff679f8958308fbc85f8c31f096977294f0176bd1fb72
data/README.md CHANGED
@@ -4,22 +4,25 @@ Automatically reload Hotwire Turbo when app files are modified.
4
4
 
5
5
  https://user-images.githubusercontent.com/839922/148676469-0acfa036-832e-4b40-aa05-1fdd945baa1f.mp4
6
6
 
7
- ## Dependencies
8
-
9
- * [Redis](https://redis.io/)
10
-
11
7
  ## Getting started
12
8
 
13
9
  Add `hotwire-livereload` to your Gemfile:
14
10
  ```
15
- bundle add hotwire-livereload --group development
11
+ group :development do
12
+ gem "hotwire-livereload", github: "kirillplatonov/hotwire-livereload"
13
+ end
16
14
  ```
17
15
 
18
- Run installer:
19
- ```
20
- rails livereload:install
16
+ Run `bundle install` and restart your server.
17
+
18
+ In your layout, make sure you don't `turbo-track` your JS/CSS in development:
19
+ ```diff
20
+ + <%= stylesheet_link_tag "application", "data-turbo-track": Rails.env.production? ? "reload" : "" %>
21
+ - <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
21
22
  ```
22
23
 
24
+ ## Configuration
25
+
23
26
  Folders watched by default:
24
27
  - `app/views`
25
28
  - `app/helpers`
@@ -32,14 +35,6 @@ Folders watched by default:
32
35
 
33
36
  The gem detects if you use [`jsbundling-rails`](https://github.com/rails/jsbundling-rails) or [`cssbundling-rails`](https://github.com/rails/cssbundling-rails) and watches for changes in their output folder `app/assets/builds` automatically.
34
37
 
35
- In your layout, make sure you don't `turbo-track` your JS/CSS in development:
36
- ```diff
37
- + <%= stylesheet_link_tag "application", "data-turbo-track": Rails.env.production? ? "reload" : "" %>
38
- - <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
39
- ```
40
-
41
- ## Configuration
42
-
43
38
  ### Listen paths
44
39
 
45
40
  You can watch for changes in additional folders by adding them to `listen_paths`:
@@ -101,17 +96,6 @@ Rails.application.configure do
101
96
  end
102
97
  ```
103
98
 
104
- In that case you need to place `hotwire_livereload_tags` helper in your layout *after* the `<%= action_cable_meta_tag %>`.
105
-
106
- ```diff
107
- <head>
108
- ...
109
- <%= action_cable_meta_tag %>
110
- + <%= hotwire_livereload_tags if Rails.env.development? %>
111
- ...
112
- </head>
113
- ```
114
-
115
99
  ### Listen options
116
100
 
117
101
  [Listen gem](https://github.com/guard/listen), which is used for file system monitoring, accepts [options](https://github.com/guard/listen?tab=readme-ov-file#options) like enabling a fallback mechanism called "polling" to detect file changes.