You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ You'll need to install two things to run Sverto:
16
16
Install the project extension using:
17
17
18
18
```
19
-
quarto use template 360-info/sverto@firstrelease-docs
19
+
quarto use template 360-info/sverto
20
20
```
21
21
22
22
Then run:
@@ -41,7 +41,7 @@ Here's the short way to add Svelte component you've written to a Quarto doc:
41
41
:::
42
42
```
43
43
44
-
2. Import your Svelte component with `Component = import_svelte("Component.svelte")`
44
+
2. Import your Svelte component in OJS with `Component = import_svelte("Component.svelte")`
45
45
3. Add a target block for your visual using `:::` and give it an `#id`
46
46
4. Instantiate the Svelte component with `myVisual = Component.default()` using some default props and your target block
47
47
5. Update the instantiated component with `myVisual.propName`
@@ -51,10 +51,12 @@ Here's the short way to add Svelte component you've written to a Quarto doc:
51
51
52
52
## 📦 What's in the box?
53
53
54
+
When you use the Sverto template in a project, it creates some files for you:
55
+
54
56
* [`example.qmd`](./example.qmd): an example Quarto doc that uses a Svelte component
55
57
* [`Circles.svelte`](./Circles.svelte): an example Svelte visualisation
56
58
* [`package.json`](./package.json): this is used to keep track of the dependencies of your Svelte components. You should add this to version control.
57
-
* Once you've run `npm install`, there'll also be a `package-lock.json` and a `.luarc.json`. You should version control these too (although you oughtn't need to edit them manually).
59
+
* Once you've run `npm install`, there'll also be a `package-lock.json` and a `.luarc.json`. You should version control these too (although you oughtn't need to edit them manually). You don't need to touch the `node_modules` folder, either.
58
60
59
61
See [`example.qmd`](./example.qmd) to learn how to add Svelte components to your documents and the [Svelte tutorial](https://svelte.dev/tutorial/basics) to learn how to create them.
0 commit comments