Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgemanrubia committed Dec 25, 2024
1 parent b911d7f commit 6f16b2a
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,24 @@ You can set configuration options on your `development.rb`. For example:
config.hotwire.spark.html_paths += %w[ lib ]
```

### General

| 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` or `app/assets/builds` if exists. |
| `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. |
| `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>` and keep the scroll. |
| `html_extensions` | The extensions to monitor for HTML content changes. By default: `rb`, `erb`. | |
| `css_extensions` | The extensions to monitor for CSS changes. By default: `css`. | |
| `stimulus_extensions` | The extensions to monitor for Stimulus changes. By default: `js`. | |

### Monitored paths

| 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` or `app/assets/builds` if exists. |
| `stimulus_paths` | Paths where file changes trigger a Stimulus controller refresh. By default: `app/javascript/controllers`. |
| `html_extensions` | The extensions to monitor for HTML content changes. By default: `rb`, `erb`. | |
| `css_extensions` | The extensions to monitor for CSS changes. By default: `css`. | |
| `stimulus_extensions` | The extensions to monitor for Stimulus changes. By default: `js`. | |

## License

Expand Down

0 comments on commit 6f16b2a

Please sign in to comment.