hotwire-livereload 1.4.1 → 2.1.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: 32c853234470c5fcf11dbe7dbdb120c4133dfb84e0b743342ec718d01a7586b2
4
+ data.tar.gz: 20d9fdce2ab0b38d14a2e81fd49f9d851cf647038a1682d7434b6e8db4af12b9
5
5
  SHA512:
6
- metadata.gz: 01e7cc071040c5fbafa3fac11adcdfff171695a82c6d6d90db06c8d2010032beb4172ae667b029512737c0afb79c005bcd2e54084661ff662bbae28157087a68
7
- data.tar.gz: 41e86aa960b2796d65aa26e1d8034a819e5ecdfea578b5995e275f713d666f9b4ffd6a9c6337a6bf17834394ac194382aa2ddf9ff74843fb0f7644ed20bfd2fa
6
+ metadata.gz: e89d3cb99f78f212719b6bb8c8a1c2c21dd6456b3ace2064a954fba1f7d644cd4bc4afc323a0c2d569ad5f0758f5ba9ceb34d96ec39d58c7ac98c2ca711f2629
7
+ data.tar.gz: 92dc37c2f41c563a9067b40973d88946e32b43e051f7ad62cb2ba930eb794329d26e0d9505081830cc38c5a705d74cb8baecf191b6ab2fb807e9e374f7c7acba
data/README.md CHANGED
@@ -4,22 +4,21 @@ 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
+ ```bash
15
11
  bundle add hotwire-livereload --group development
16
12
  ```
17
13
 
18
- Run installer:
19
- ```
20
- rails livereload:install
14
+ In your layout, make sure you don't `turbo-track` your JS/CSS in development:
15
+ ```diff
16
+ + <%= stylesheet_link_tag "application", "data-turbo-track": Rails.env.production? ? "reload" : "" %>
17
+ - <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
21
18
  ```
22
19
 
20
+ ## Configuration
21
+
23
22
  Folders watched by default:
24
23
  - `app/views`
25
24
  - `app/helpers`
@@ -32,14 +31,6 @@ Folders watched by default:
32
31
 
33
32
  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
33
 
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
34
  ### Listen paths
44
35
 
45
36
  You can watch for changes in additional folders by adding them to `listen_paths`:
@@ -101,17 +92,6 @@ Rails.application.configure do
101
92
  end
102
93
  ```
103
94
 
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
95
  ### Listen options
116
96
 
117
97
  [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.