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

Commit abc05ed

Browse files
committed
chore: remove nuxt example
1 parent 7db2d75 commit abc05ed

File tree

9 files changed

+2
-135
lines changed

9 files changed

+2
-135
lines changed

README.md

Lines changed: 2 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -44,76 +44,9 @@ Example: [`playground/`](./playground/)
4444
<details>
4545
<summary>Nuxt</summary><br>
4646

47-
> From v0.28.0 of `@nuxtjs/composition-api`, this plugin is included and enabled out-of-box.
47+
> It's built-in in [Nuxt Bridge](https://github.com/nuxt/bridge).
4848
49-
```bash
50-
npm i @nuxtjs/composition-api
51-
```
52-
53-
```ts
54-
// nuxt.config.js
55-
export default {
56-
buildModules: [
57-
'@nuxtjs/composition-api/module',
58-
],
59-
scriptSetup: { /* options */ },
60-
}
61-
```
62-
63-
> This module works for both Nuxt 2 and [Nuxt Vite](https://github.com/nuxt/vite)
64-
65-
Example: [`examples/nuxt`](./examples/nuxt)
66-
67-
###### Component Meta
68-
69-
Note that `<script setup>` could co-exist with `<script>`, if you want to define component metadata like `layout` or `head` for Nuxt, you can do it this way:
70-
71-
```html
72-
<script setup lang="ts">
73-
// your script setup
74-
</script>
75-
76-
<script lang="ts">
77-
// the normal script
78-
export default {
79-
layout: 'user',
80-
// ...other meta
81-
}
82-
</script>
83-
```
84-
85-
###### TypeScript
86-
87-
To use TypeScript with Nuxt, install the [`@nuxtjs/typescript-module`](https://typescript.nuxtjs.org/) but disable the type check:
88-
89-
```bash
90-
npm i -D @nuxt/typescript-build vue-tsc
91-
```
92-
93-
```ts
94-
// nuxt.config.js
95-
export default {
96-
buildModules: [
97-
['@nuxt/typescript-build', { typeCheck: false }],
98-
'@nuxtjs/composition-api/module',
99-
'unplugin-vue2-script-setup/nuxt',
100-
],
101-
}
102-
```
103-
104-
And then use [`vue-tsc`](https://github.com/johnsoncodehk/volar) to do the type check at build time:
105-
106-
```jsonc
107-
// package.json
108-
{
109-
"scripts": {
110-
"dev": "nuxt",
111-
"build": "vue-tsc --noEmit && nuxt build"
112-
}
113-
}
114-
```
115-
116-
<br></details>
49+
</details>
11750

11851
<details>
11952
<summary>Vue CLI</summary><br>

examples/nuxt-bridge/.npmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/nuxt-bridge/README.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

examples/nuxt-bridge/layouts/default.vue

Lines changed: 0 additions & 11 deletions
This file was deleted.

examples/nuxt-bridge/nuxt.config.ts

Lines changed: 0 additions & 9 deletions
This file was deleted.

examples/nuxt-bridge/package.json

Lines changed: 0 additions & 14 deletions
This file was deleted.

examples/nuxt-bridge/pages/index.vue

Lines changed: 0 additions & 18 deletions
This file was deleted.

examples/nuxt-bridge/pages/test/_slug.vue

Lines changed: 0 additions & 7 deletions
This file was deleted.

examples/nuxt-bridge/tsconfig.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)