From 57df5da08156f6a864d356620348b53eb168aa80 Mon Sep 17 00:00:00 2001 From: Chris Oliver Date: Wed, 18 Dec 2024 11:09:21 -0600 Subject: [PATCH] Add builds to stimulus paths --- README.md | 14 +++++++------- lib/hotwire/spark/engine.rb | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 768f74dd..81dd1eca 100644 --- a/README.md +++ b/README.md @@ -36,13 +36,13 @@ You can set configuration options on your `development.rb`. For example: config.hotwire.spark.html_paths += %w[ lib ] ``` -| Name | Description | -|------------------|------------------------------------------------------------------------------------------------------------------------------| -| `html_paths` | Paths where file changes trigger a content refresh. By default: `app/controllers`, `app/helpers`, `app/models`, `app/views`. | -| `css_paths` | Paths where file changes trigger a CSS refresh. By default: `app/assets/stylesheets`, `app/assets/builds`. | -| `stimulus_paths` | Paths where file changes trigger a Stimulus controller refresh. By default: `app/javascript/controllers`. | -| `enabled` | Enable or disable live reloading. By default, it's only enabled in `development`. | -| `logging` | Show logs in the browser console when reloading happens. It's false by default. | +| Name | Description | +|------------------|--------------------------------------------------------------------------------------------------------------------------------| +| `html_paths` | Paths where file changes trigger a content refresh. By default: `app/controllers`, `app/helpers`, `app/models`, `app/views`. | +| `css_paths` | Paths where file changes trigger a CSS refresh. By default: `app/assets/stylesheets`, `app/assets/builds`. | +| `stimulus_paths` | Paths where file changes trigger a Stimulus controller refresh. By default: `app/javascript/controllers`, `app/assets/builds`. | +| `enabled` | Enable or disable live reloading. By default, it's only enabled in `development`. | +| `logging` | Show logs in the browser console when reloading happens. It's false by default. | ## License diff --git a/lib/hotwire/spark/engine.rb b/lib/hotwire/spark/engine.rb index e8e2aa4d..783cbcf6 100644 --- a/lib/hotwire/spark/engine.rb +++ b/lib/hotwire/spark/engine.rb @@ -10,7 +10,7 @@ class Engine < ::Rails::Engine enabled: Rails.env.development?, css_paths: %w[ app/assets/stylesheets app/assets/builds ], html_paths: %w[ app/controllers app/helpers app/models app/views ], - stimulus_paths: %w[ app/javascript/controllers ] + stimulus_paths: %w[ app/javascript/controllers app/assets/builds ] initializer "hotwire_spark.config" do |app| config.hotwire.spark.each do |key, value|