Skip to content

Commit 424962c

Browse files
committed
chore: add nuxt playground
1 parent 0c0b1e4 commit 424962c

File tree

11 files changed

+2852
-73
lines changed

11 files changed

+2852
-73
lines changed

.npmrc

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
shamefully-hoist=true
2+
strict-peer-dependencies=false

nuxt-playground/.gitignore

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
node_modules
2+
*.log*
3+
.nuxt
4+
.nitro
5+
.cache
6+
.output
7+
.env
8+
dist

nuxt-playground/README.md

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Nuxt 3 Minimal Starter
2+
3+
Look at the [nuxt 3 documentation](https://v3.nuxtjs.org) to learn more.
4+
5+
## Setup
6+
7+
Make sure to install the dependencies:
8+
9+
```bash
10+
# yarn
11+
yarn install
12+
13+
# npm
14+
npm install
15+
16+
# pnpm
17+
pnpm install --shamefully-hoist
18+
```
19+
20+
## Development Server
21+
22+
Start the development server on http://localhost:3000
23+
24+
```bash
25+
npm run dev
26+
```
27+
28+
## Production
29+
30+
Build the application for production:
31+
32+
```bash
33+
npm run build
34+
```
35+
36+
Locally preview production build:
37+
38+
```bash
39+
npm run preview
40+
```
41+
42+
Checkout the [deployment documentation](https://v3.nuxtjs.org/guide/deploy/presets) for more information.

nuxt-playground/nuxt.config.ts

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// https://v3.nuxtjs.org/api/configuration/nuxt.config
2+
export default defineNuxtConfig({
3+
pageTransition: null,
4+
layoutTransition: null,
5+
})

nuxt-playground/package.json

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"private": true,
3+
"scripts": {
4+
"build": "nuxt build",
5+
"dev": "nuxt dev",
6+
"generate": "nuxt generate",
7+
"preview": "nuxt preview",
8+
"postinstall": "nuxt prepare"
9+
},
10+
"devDependencies": {
11+
"nuxt": "^3.0.0-rc.12",
12+
"vuefire": "workspace:*"
13+
}
14+
}
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<script lang="ts" setup>
2+
const router = useRouter()
3+
4+
const routes = router
5+
.getRoutes()
6+
.filter((record) => record.path.startsWith('/database/'))
7+
.map((record) => {
8+
return {
9+
name: record.name,
10+
path: record.path,
11+
}
12+
})
13+
</script>
14+
15+
<template>
16+
<div>
17+
<NuxtLink to="/">&lt;&lt; Back Home</NuxtLink>
18+
<ul>
19+
<li v-for="link in routes">
20+
<NuxtLink :to="link">{{ link.path }}</NuxtLink>
21+
</li>
22+
</ul>
23+
</div>
24+
</template>
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<script setup lang="ts">
2+
const todos = []
3+
</script>
4+
5+
<template>
6+
<div>
7+
<h1>Todos</h1>
8+
<ul>
9+
<li v-for="todo in todos" :key="todo.id">
10+
<NuxtLink :to="`/database/todos/${todo.id}`">{{ todo.title }}</NuxtLink>
11+
</li>
12+
</ul>
13+
</div>
14+
</template>

nuxt-playground/pages/index.vue

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<template>
2+
<div>
3+
<ul>
4+
<li>
5+
<NuxtLink to="/database">Database</NuxtLink>
6+
</li>
7+
</ul>
8+
</div>
9+
</template>

nuxt-playground/tsconfig.json

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
// https://v3.nuxtjs.org/concepts/typescript
3+
"extends": "./.nuxt/tsconfig.json",
4+
"compilerOptions": {
5+
"baseUrl": ".",
6+
"paths": {
7+
"vuefire": [
8+
"../src/index.ts"
9+
]
10+
}
11+
},
12+
}

0 commit comments

Comments
 (0)