Skip to content

Commit f188ac9

Browse files
committed
Add note on live reload
1 parent 45f526d commit f188ac9

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ Here's the short way to add Svelte component you've written to a Quarto doc:
4949
5050
**To see this all in practice, check out [`example.qmd`](./example.qmd).**
5151
52+
> **Note:** `quarto preview` won't "live reload" when you modify your Svelte component—but if you modify and save the Quarto doc that imports it, that will trigger a re-render. You may need to hard reload the page in your browser to see the updated Svelte component.
53+
>
54+
> If you want to quickly iterate on the Svelte component and you aren't too concerned about the rest of your Quarto doc, you might find the [Svelte Preview](https://marketplace.visualstudio.com/items?itemName=RafaelMartinez.svelte-preview) extension for VSCode handy.
55+
5256
## 📦 What's in the box?
5357
5458
When you use the Sverto template in a project, it creates some files for you:

docs/index.qmd

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ Here's the short way to add Svelte component you've written to a Quarto doc:
6060
6161
**To see this all in practice, check out [`example.qmd`](https://github.com/360-info/sverto/blob/firstrelease/example.qmd).**
6262
63+
:::{.callout-note}
64+
The `quarto preview` command won't "live reload" when you modify your Svelte component—but if you modify and save the Quarto doc that imports it, that will trigger a re-render. You may need to hard reload the page in your browser to see the updated Svelte component.
65+
66+
If you want to quickly iterate on the Svelte component and you aren't too concerned about the rest of your Quarto doc, you might find the [Svelte Preview](https://marketplace.visualstudio.com/items?itemName=RafaelMartinez.svelte-preview) extension for VSCode handy.
67+
:::
68+
6369
## 🛍 Use other libraries in your Svelte component
6470
6571
If you want to refer to other JavaScript libraries in your Svelte component (like d3, for example), add them to the project using `npm install package1 [package2 ...]`. For example:

0 commit comments

Comments
 (0)