hotwire-spark 0.1.8 → 0.1.10

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: 02a5ea2b84cf01ecb945e62471f479634276f570f26e43c1ef97aa04542d78c2
4
- data.tar.gz: dbc21f5210bd592f484305f05fad5a4906a357569cab0a0bcf000929a2d6db34
3
+ metadata.gz: 86280ef674a47bc00119c73166435a363c34e6c22804444df25d8f909fe5755c
4
+ data.tar.gz: 016b6bc8f6bf0f22bf3cec4baa754a167fdc526230f0a57df83c1f0916ee4f56
5
5
  SHA512:
6
- metadata.gz: 2af64583cc6a708d318db7f1d77848a7682a449e2218094397873b7d79cbe911bf4cb09aa0fcaa3b1d7ffae500f628ff8d7063020b73bfee8bba8c38df6c2e19
7
- data.tar.gz: cc4571e7b376e3355285062e7858668559cb0fb847c616b0e0cff3a630d23f0d73b88554bb83ada84f61e65bdab78b52627fa687bf7a3d806231e871e23dbeeb
6
+ metadata.gz: be78aab02729c9f00b86f366ce7ff2813dab842a2e1b78699d19dfaaf11b61a98e31269cb625939c4a8204fa3c6c3b0f51548098ff4df3cd78d1eee91dfd26b6
7
+ data.tar.gz: ef71e4ecbb78de1dcfe7b2224e40b7d41455a2da4feb3cbf0967664acd7d8eb8a9e5b3cae7a9fbba48c1647eda661249d7c9866de595e12cc186a4471323eb8c
data/README.md CHANGED
@@ -24,12 +24,25 @@ That's it!
24
24
 
25
25
  The system will listen for three kinds of changes and will take action depending on each:
26
26
 
27
- * **HTML change:** it fetches the new document body and updates the current body with morphing. It uses [`idiomorph`](https://github.com/bigskysoftware/idiomorph) under the hood.
27
+ * HTML contents
28
+ * CSS
29
+ * Stimulus controllers
30
+
31
+ Depending on your setup, the default behavior will be different.
32
+
33
+ ### Importmaps
34
+
35
+ Importmaps allows for the smoother updates because it supports hot-reloading for Stimulus controllers:
36
+
37
+ * **HTML change:** it fetches the new document body and updates the current body with morphing, then it reloads the Stimulus controllers in the page. It uses [`idiomorph`](https://github.com/bigskysoftware/idiomorph) under the hood.
28
38
  * **CSS change:** it fetches and reloads the stylesheet that changed.
29
39
  * **Stimulus controller change:** it fetches the Stimulus controller that changed and reloads all the controllers in the page.
30
40
 
31
- > [!NOTE]
32
- > Hotwire Spark currently does not support `jsbundling`, only import maps.
41
+ ### JavaScript Bundling
42
+
43
+ * **HTML change:** it reloads the page with a Turbo visit.
44
+ * **CSS change:** it fetches and reloads the stylesheet that changed.
45
+ * **Stimulus controller change:** it reloads the page with a Turbo visit.
33
46
 
34
47
  ## Configuration
35
48
 
@@ -39,13 +52,17 @@ You can set configuration options on your `development.rb`. For example:
39
52
  config.hotwire.spark.html_paths += %w[ lib ]
40
53
  ```
41
54
 
42
- | Name | Description |
43
- |------------------|------------------------------------------------------------------------------------------------------------------------------|
44
- | `html_paths` | Paths where file changes trigger a content refresh. By default: `app/controllers`, `app/helpers`, `app/models`, `app/views`. |
45
- | `css_paths` | Paths where file changes trigger a CSS refresh. By default: `app/assets/stylesheets` or `app/assets/builds` if exists. |
46
- | `stimulus_paths` | Paths where file changes trigger a Stimulus controller refresh. By default: `app/javascript/controllers`. |
47
- | `enabled` | Enable or disable live reloading. By default, it's only enabled in `development`. |
48
- | `logging` | Show logs in the browser console when reloading happens. It's false by default. |
55
+ | Name | Description |
56
+ |-----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
57
+ | `html_paths` | Paths where file changes trigger a content refresh. By default: `app/controllers`, `app/helpers`, `app/models`, `app/views`. |
58
+ | `css_paths` | Paths where file changes trigger a CSS refresh. By default: `app/assets/stylesheets` or `app/assets/builds` if exists. |
59
+ | `stimulus_paths` | Paths where file changes trigger a Stimulus controller refresh. By default: `app/javascript/controllers`. |
60
+ | `enabled` | Enable or disable live reloading. By default, it's only enabled in `development`. |
61
+ | `logging` | Show logs in the browser console when reloading happens. It's false by default. |
62
+ | `html_reload_method` | How to perform reloads when HTML content changes: `:morph` or `:replace`. By default, it is `:morph` and it will morph the `<body>` of the page and reload all the stimulus controllers. Set to `:replace` to reload the page with a regular Turbo navigation that will replace the `<body>`. |
63
+ | `html_extensions` | The extension to monitor for HTML content changes. By default: `rb`, `erb`. | |
64
+ | `css_extensions` | The extension to monitor for CSS changes. By default: `css`. | |
65
+ | `stimulus_extensions` | The extension to monitor for CSS changes. By default: `js`. | |
49
66
 
50
67
  ## License
51
68