Skip to content

Commit

Permalink
docs: added docs on watch exclusions
Browse files Browse the repository at this point in the history
  • Loading branch information
arctic-hen7 committed Feb 2, 2023
1 parent 6f57d4a commit 8f9936a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/next/en-US/first-app/dev-cycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,13 @@ Importantly, any time you don't need to be actually seeing the views your app is
Then, when you need to see what your app looks like in a browser, for example when you're styling it, or testing a particular feature, you can use `perseus serve -w`. If you're updating static content (like a `.css` file), rebuilds will be pretty much instant, but updating the Rust code of your app will be a fair bit slower. This is unfortunately a downside of working with Rust web development, but, in return, you get an *extremely* performant site that eliminates whole classes of bugs that run rampant in JS code.

*Note: there is currently ongoing development on the Sycamore side for a system to remove the need for recompilation when you change things in the `view! { .. }` macro, which will dramatically improve performance.*

## Custom watches

Sometimes you'll want `perseus` to watch more than just your source code. For example, when we're writing some new docs for this website, we want the `docs` folder to be watched, so we run something like this

```
perseus serve -w --custom-watch ../docs
```

This system works pretty much exactly how you'd expect it to: paths are relative to the current directory, and recursion works as you'd expect. If you want to *exclude* some paths (e.g. if you have another build tool running to generate a stylesheet automatically), you can use `--custom-watch !my-path`, which will work with nesting. Exclusions will override inclusions in this system.

0 comments on commit 8f9936a

Please sign in to comment.