Skip to content

Commit

Permalink
Add builds to stimulus paths
Browse files Browse the repository at this point in the history
  • Loading branch information
excid3 committed Dec 18, 2024
1 parent cc6849e commit 57df5da
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion lib/hotwire/spark/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down

0 comments on commit 57df5da

Please sign in to comment.