Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.

Commit c834119

Browse files
committed
docs: update docs
1 parent 219ba50 commit c834119

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

README.md

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ npm i -D vue2-script-setup-transform
1111
npm i @vue/composition-api
1212
```
1313

14-
Install [`@vue/composition-api`](https://github.com/vuejs/composition-api) in your App's entry (this enables the `setup()` hook).
14+
Install [`@vue/composition-api`](https://github.com/vuejs/composition-api) in your App's entry (it enables the `setup()` hook):
1515

1616
```ts
1717
import Vue from 'vue'
@@ -20,9 +20,8 @@ import VueCompositionAPI from '@vue/composition-api'
2020
Vue.use(VueCompositionAPI)
2121
```
2222

23-
-------
24-
25-
###### Vite
23+
<details>
24+
<summary>Vite</summary><br>
2625

2726
```ts
2827
// vite.config.ts
@@ -40,9 +39,10 @@ export default defineConfig({
4039

4140
Example: [`playground/`](./playground/)
4241

43-
-------
42+
</details>
4443

45-
###### Nuxt
44+
<details>
45+
<summary>Nuxt</summary><br>
4646

4747
```bash
4848
npm i @nuxtjs/composition-api
@@ -60,9 +60,10 @@ export default {
6060

6161
Example: [`examples/nuxt`](./examples/nuxt)
6262

63-
-------
63+
</details>
6464

65-
###### Webpack
65+
<details>
66+
<summary>Webpack</summary><br>
6667

6768
```ts
6869
// webpack.config.js
@@ -76,9 +77,10 @@ module.exports = {
7677
}
7778
```
7879

79-
-------
80+
</details>
8081

81-
###### JavaScript API
82+
<details>
83+
<summary>JavaScript API</summary><br>
8284

8385
```ts
8486
import { transform } from 'vue2-script-setup-transform'
@@ -94,6 +96,8 @@ const Vue2SFC = transform(`
9496
`)
9597
```
9698

99+
</details>
100+
97101
## IDE
98102

99103
We recommend using [VS Code](https://code.visualstudio.com/) with [Volar](https://github.com/johnsoncodehk/volar) to get the best experience (You might want to disable Vetur if you have it).
@@ -110,7 +114,7 @@ npm i -D @vue/runtime-dom
110114

111115
If you are using ESLint, you might get `@typescript-eslint/no-unused-vars` warning with `<script setup>`. You can disable it and add `noUnusedLocals: true` in your `tsconfig.json`, Volar will infer the real missing locals correctly for you.
112116

113-
## Status
117+
## Progress
114118

115119
- [x] PoC
116120
- [x] Components registration
@@ -131,7 +135,7 @@ If you are using ESLint, you might get `@typescript-eslint/no-unused-vars` warni
131135

132136
![image](https://user-images.githubusercontent.com/11247099/130307245-20f9342e-377b-4565-b55d-1b91741b5c0f.png)
133137

134-
It's made possible by transforming the SFC back to normal `<script>` and let the Vue 2 SFC compiler handle the rest.
138+
It's made possible by transforming the `<script setup>` syntax back to normal `<script>` and let the Vue 2 SFC compiler handle the rest.
135139

136140
</details>
137141

0 commit comments

Comments
 (0)