Skip to content

Commit 1c86c19

Browse files
authored
Add section about --unstable-component to Astro and Vue guides (#1786)
1 parent 3dd85c2 commit 1c86c19

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

examples/tutorials/astro.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,23 @@ We can start the Astro server with `deno task dev`:
104104
105105
![Getting the Astro app to work](./images/how-to/astro/hello-astro.png)
106106
107+
## Configure the formatter
108+
109+
`deno fmt` supports Astro files with the
110+
[`--unstable-component`](https://docs.deno.com/runtime/reference/cli/fmt/#formatting-options-unstable-component)
111+
flag. To use it, run this command:
112+
113+
```sh
114+
deno fmt --unstable-component
115+
```
116+
117+
To configure `deno fmt` to always format your Astro files, add this at the top
118+
level of your `deno.json` file:
119+
120+
```json
121+
"unstable": ["fmt-component"]
122+
```
123+
107124
## Update index page to list all dinosaurs
108125
109126
Our app will display facts about a variety of dinosaurs. The first page to

examples/tutorials/vue.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,23 @@ deno task dev
4646
Deno will run the `dev` task from the `package.json` file which will start the
4747
Vite server. Click the output link to localhost to see your app in the browser.
4848

49+
## Configure the formatter
50+
51+
`deno fmt` supports Vue files with the
52+
[`--unstable-component`](https://docs.deno.com/runtime/reference/cli/fmt/#formatting-options-unstable-component)
53+
flag. To use it, run this command:
54+
55+
```sh
56+
deno fmt --unstable-component
57+
```
58+
59+
To configure `deno fmt` to always format your Vue files, add this at the top
60+
level of your `deno.json` file:
61+
62+
```json
63+
"unstable": ["fmt-component"]
64+
```
65+
4966
## Add a backend
5067

5168
The next step is to add a backend API. We'll create a very simple API that

0 commit comments

Comments
 (0)