bun_bun_bundle 0.5.0 → 0.5.1
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 +4 -4
- data/lib/bun_bun_bundle/reload_tag.rb +8 -2
- data/lib/bun_bun_bundle/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 01053ee4f895f8d24614790b64ba21f8b61ba6acbeb538007e88fed6b20d1a92
|
|
4
|
+
data.tar.gz: 3f55e7edfa1b5fede049bad52c22a6e28faac5c77cef230083d3ecd48a2c7cbc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 90d8e766d94a452ea7364a1c55e061d927a9e5af80e35aa616ef418eadacaccdd85248845ba912e98d83e08b07440c40bbc984b3632f805549977f52879e543f
|
|
7
|
+
data.tar.gz: c62aed94154ca7066a12fde9aa994013b36c67f28ed8c894de902564b4b3a802a08f8103fe71d6e2efd28d557fa5b6463dc5226058f099c9c739f94e47115d9e
|
|
@@ -31,6 +31,7 @@ module BunBunBundle
|
|
|
31
31
|
(() => {
|
|
32
32
|
const cssPaths = #{css_paths.to_json};
|
|
33
33
|
const ws = new WebSocket('#{config.dev_server.ws_url}')
|
|
34
|
+
let connected = false
|
|
34
35
|
|
|
35
36
|
ws.onmessage = (event) => {
|
|
36
37
|
const data = JSON.parse(event.data)
|
|
@@ -53,8 +54,13 @@ module BunBunBundle
|
|
|
53
54
|
}
|
|
54
55
|
}
|
|
55
56
|
|
|
56
|
-
ws.onopen = () =>
|
|
57
|
-
|
|
57
|
+
ws.onopen = () => {
|
|
58
|
+
connected = true
|
|
59
|
+
console.log('\\u25b8 Live reload connected')
|
|
60
|
+
}
|
|
61
|
+
ws.onclose = () => {
|
|
62
|
+
if (connected) setTimeout(() => location.reload(), 2000)
|
|
63
|
+
}
|
|
58
64
|
})()
|
|
59
65
|
</script>
|
|
60
66
|
HTML
|