rails_hotreload 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -6
- data/lib/rails_hotreload/version.rb +1 -1
- data/lib/rails_hotreload/views/rails_hotreload/_stream.html.erb +3 -6
- data/lib/rails_hotreload.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 388ccd4d1e7a486cc28be26eabe8b3c28c5d9b94cb0a7a14f1e909c7985d3859
|
4
|
+
data.tar.gz: 914e3b8205f31a1b78574a3477caac9f7e46da301ec70ee57a2c6ce48cdb2a36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5666308a1b207c064d4e3b2d0a039215cbee1f983d2694ca2664213c286417c0c90462999091bcb5265a165437a197abe3fb8924c0cc6379c022fd6fdc76d633
|
7
|
+
data.tar.gz: 657b7072b30182d445b529a20b79744bc6f599d5a92c3a0c12d23823f3b5e6fd7a0e8e18620967dc14659e27d9ec1508304b7e03c2c371557f38019e06a3de4e
|
data/README.md
CHANGED
@@ -35,6 +35,7 @@ rails_hotreload: bin/rails rails_hotreload:start
|
|
35
35
|
- Start your rails application and try editing your views or stylesheets or js files to see immediate changes in your browser
|
36
36
|
|
37
37
|
## Configuration
|
38
|
+
- Make sure your Turbo settings are well configured. See https://github.com/hotwired/turbo-rails#installation (Specially #4)
|
38
39
|
- This gem by default is watching changes in: `app/assets/builds,app/views/`. This can be customized as the following:
|
39
40
|
```
|
40
41
|
bin/rails rails_hotreload:start app/javascripts,app/stylesheets,app/views/
|
@@ -45,13 +46,9 @@ bin/rails rails_hotreload:start app/javascripts,app/stylesheets,app/views/
|
|
45
46
|
```
|
46
47
|
|
47
48
|
## Contributing
|
48
|
-
Bug reports and pull requests are welcome on
|
49
|
+
Bug reports and pull requests are welcome on https://github.com/owen2345/rails-hotreload. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
49
50
|
|
50
|
-
|
51
|
+
To ensure your contribution changes, run the tests with: `docker-compose run test`
|
51
52
|
|
52
53
|
## License
|
53
54
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
54
|
-
|
55
|
-
## **Code of Conduct**
|
56
|
-
|
57
|
-
Everyone interacting in the PubSubModelSync project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/pub_sub_model_sync/blob/master/CODE_OF_CONDUCT.md).
|
@@ -2,12 +2,9 @@
|
|
2
2
|
<%= turbo_stream_from 'rails_hotreload' %>
|
3
3
|
<span>Hot-reloading: <input type="checkbox" style="vertical-align: middle;" checked></span>
|
4
4
|
<script type="text/javascript">
|
5
|
-
|
6
|
-
const
|
7
|
-
|
8
|
-
const enabled = panel.querySelector('input').checked;
|
9
|
-
if (enabled) window.location.reload();
|
10
|
-
});
|
5
|
+
document.getElementById('rails_hotreload').addEventListener('DOMNodeInserted', function(){
|
6
|
+
const enabled = document.body.querySelector('#rails_hotreload input').checked;
|
7
|
+
if (enabled) window.location.reload();
|
11
8
|
});
|
12
9
|
</script>
|
13
10
|
</div>
|
data/lib/rails_hotreload.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_hotreload
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Owen Peredo Diaz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-03-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: listen
|