Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
46c9ae9675 | ||
|
|
060c08ecd1 |
No files matched your search
+1
-2
@@ -1,2 +1 @@
|
|||||||
open_collective: antfu
|
github: antfu
|
||||||
github: [antfu]
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
name: CI
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
lint:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: pnpm/action-setup@v4
|
|
||||||
- uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: lts/*
|
|
||||||
cache: pnpm
|
|
||||||
|
|
||||||
- name: Install
|
|
||||||
run: pnpm install
|
|
||||||
|
|
||||||
- name: Lint
|
|
||||||
run: pnpm run lint
|
|
||||||
|
|
||||||
typecheck:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: pnpm/action-setup@v4
|
|
||||||
- uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: lts/*
|
|
||||||
cache: pnpm
|
|
||||||
|
|
||||||
- name: Install
|
|
||||||
run: pnpm install
|
|
||||||
|
|
||||||
- name: Typecheck
|
|
||||||
run: pnpm run typecheck
|
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
.DS_Store
|
|
||||||
node_modules
|
node_modules
|
||||||
*.log
|
*.log
|
||||||
dist
|
dist
|
||||||
@@ -6,5 +5,3 @@ dist
|
|||||||
.nuxt
|
.nuxt
|
||||||
.env
|
.env
|
||||||
.idea/
|
.idea/
|
||||||
public/assets/fonts
|
|
||||||
.rolldown
|
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
shamefully-hoist=true
|
shamefully-hoist=true
|
||||||
strict-peer-dependencies=false
|
strict-peer-dependencies=false
|
||||||
shell-emulator=true
|
shell-emulator=true
|
||||||
auto-install-peers=false
|
|
||||||
Vendored
+1
-2
@@ -5,7 +5,6 @@
|
|||||||
"antfu.goto-alias",
|
"antfu.goto-alias",
|
||||||
"csstools.postcss",
|
"csstools.postcss",
|
||||||
"dbaeumer.vscode-eslint",
|
"dbaeumer.vscode-eslint",
|
||||||
"vue.volar",
|
"vue.volar"
|
||||||
"antfu.pnpm-catalog-lens"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
Vendored
+5
-40
@@ -1,45 +1,10 @@
|
|||||||
{
|
{
|
||||||
|
"prettier.enable": false,
|
||||||
|
"editor.codeActionsOnSave": {
|
||||||
|
"source.fixAll.eslint": true
|
||||||
|
},
|
||||||
"files.associations": {
|
"files.associations": {
|
||||||
"*.css": "postcss"
|
"*.css": "postcss"
|
||||||
},
|
},
|
||||||
|
"editor.formatOnSave": false
|
||||||
// Disable the default formatter, use eslint instead
|
|
||||||
"prettier.enable": false,
|
|
||||||
"editor.formatOnSave": false,
|
|
||||||
|
|
||||||
// Auto fix
|
|
||||||
"editor.codeActionsOnSave": {
|
|
||||||
"source.fixAll.eslint": "explicit",
|
|
||||||
"source.organizeImports": "never"
|
|
||||||
},
|
|
||||||
|
|
||||||
// Silent the stylistic rules in you IDE, but still auto fix them
|
|
||||||
"eslint.rules.customizations": [
|
|
||||||
{ "rule": "style/*", "severity": "off" },
|
|
||||||
{ "rule": "*-indent", "severity": "off" },
|
|
||||||
{ "rule": "*-spacing", "severity": "off" },
|
|
||||||
{ "rule": "*-spaces", "severity": "off" },
|
|
||||||
{ "rule": "*-order", "severity": "off" },
|
|
||||||
{ "rule": "*-dangle", "severity": "off" },
|
|
||||||
{ "rule": "*-newline", "severity": "off" },
|
|
||||||
{ "rule": "*quotes", "severity": "off" },
|
|
||||||
{ "rule": "*semi", "severity": "off" }
|
|
||||||
],
|
|
||||||
|
|
||||||
// Enable eslint for all supported languages
|
|
||||||
"eslint.validate": [
|
|
||||||
"javascript",
|
|
||||||
"javascriptreact",
|
|
||||||
"typescript",
|
|
||||||
"typescriptreact",
|
|
||||||
"vue",
|
|
||||||
"html",
|
|
||||||
"markdown",
|
|
||||||
"json",
|
|
||||||
"jsonc",
|
|
||||||
"yaml"
|
|
||||||
],
|
|
||||||
"interline-translate.knownPopularWordCount": 6000,
|
|
||||||
"iconify.annotations": true,
|
|
||||||
"iconify.inplace": true
|
|
||||||
}
|
}
|
||||||
-22
@@ -1,22 +0,0 @@
|
|||||||
FROM node:20-alpine AS build-stage
|
|
||||||
|
|
||||||
WORKDIR /app
|
|
||||||
RUN corepack enable
|
|
||||||
|
|
||||||
COPY .npmrc package.json pnpm-lock.yaml pnpm-workspace.yaml ./
|
|
||||||
RUN --mount=type=cache,id=pnpm-store,target=/root/.pnpm-store \
|
|
||||||
pnpm install --frozen-lockfile
|
|
||||||
|
|
||||||
COPY . .
|
|
||||||
RUN pnpm build
|
|
||||||
|
|
||||||
# SSR
|
|
||||||
FROM node:20-alpine AS production-stage
|
|
||||||
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
COPY --from=build-stage /app/.output ./.output
|
|
||||||
|
|
||||||
EXPOSE 3000
|
|
||||||
|
|
||||||
CMD ["node", ".output/server/index.mjs"]
|
|
||||||
@@ -3,19 +3,23 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h2 align="center">
|
<h2 align="center">
|
||||||
<a href="https://github.com/antfu/vitesse">Vitesse</a> for Nuxt 4
|
<a href="https://github.com/antfu/vitesse">Vitesse</a> for Nuxt 3
|
||||||
</h2><br>
|
</h2><br>
|
||||||
|
|
||||||
|
<pre align="center">
|
||||||
|
🧪 Working in Progress
|
||||||
|
</pre>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<br>
|
<br>
|
||||||
<a href="https://vitesse-nuxt3.netlify.app/">🖥 Online Preview</a>
|
<a href="https://vitesse-nuxt3.netlify.app/">🖥 Online Preview</a>
|
||||||
<br><br>
|
<br><br>
|
||||||
<a href="https://stackblitz.com/github/antfu/vitesse-nuxt"><img src="https://developer.stackblitz.com/img/open_in_stackblitz.svg" alt=""></a>
|
<a href="https://stackblitz.com/github/antfu/vitesse-nuxt3"><img src="https://developer.stackblitz.com/img/open_in_stackblitz.svg" alt=""></a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- 💚 [Nuxt 4](https://nuxt.com/) - SSR, ESR, File-based routing, components auto importing, modules, etc.
|
- 💚 [Nuxt 3](https://nuxt.com/) - SSR, ESR, File-based routing, components auto importing, modules, etc.
|
||||||
|
|
||||||
- ⚡️ Vite - Instant HMR.
|
- ⚡️ Vite - Instant HMR.
|
||||||
|
|
||||||
@@ -25,9 +29,9 @@
|
|||||||
|
|
||||||
- 🔥 The `<script setup>` syntax.
|
- 🔥 The `<script setup>` syntax.
|
||||||
|
|
||||||
- 🍍 [State Management via Pinia](https://github.com/vuejs/pinia), see [./app/composables/user.ts](./app/composables/user.ts).
|
- 🍍 [State Management via Pinia](https://github.com/vuejs/pinia), see [./composables/user.ts](./composables/user.ts).
|
||||||
|
|
||||||
- 📑 [Layout system](./app/layouts).
|
- 📑 [Layout system](./layouts).
|
||||||
|
|
||||||
- 📥 APIs auto importing - for Composition API, VueUse and custom composables.
|
- 📥 APIs auto importing - for Composition API, VueUse and custom composables.
|
||||||
|
|
||||||
@@ -35,7 +39,8 @@
|
|||||||
|
|
||||||
- 🦾 TypeScript, of course.
|
- 🦾 TypeScript, of course.
|
||||||
|
|
||||||
- 📲 [PWA](https://github.com/vite-pwa/nuxt) with offline support and auto-update behavior.
|
- 📲 [PWA](https://github.com/vite-pwa/nuxt) with offline support and auto update behavior.
|
||||||
|
|
||||||
|
|
||||||
## Plugins
|
## Plugins
|
||||||
|
|
||||||
@@ -45,12 +50,12 @@
|
|||||||
- [ColorMode](https://github.com/nuxt-modules/color-mode) - dark and Light mode with auto detection made easy with Nuxt.
|
- [ColorMode](https://github.com/nuxt-modules/color-mode) - dark and Light mode with auto detection made easy with Nuxt.
|
||||||
- [UnoCSS](https://github.com/unocss/unocss) - the instant on-demand atomic CSS engine.
|
- [UnoCSS](https://github.com/unocss/unocss) - the instant on-demand atomic CSS engine.
|
||||||
- [Pinia](https://github.com/vuejs/pinia) - intuitive, type safe, light and flexible Store for Vue.
|
- [Pinia](https://github.com/vuejs/pinia) - intuitive, type safe, light and flexible Store for Vue.
|
||||||
- [VitePWA](https://github.com/vite-pwa/nuxt) - zero-config PWA Plugin for Nuxt 4.
|
- [VitePWA](https://github.com/vite-pwa/nuxt) - zero-config PWA Plugin for Nuxt 3.
|
||||||
- [DevTools](https://github.com/nuxt/devtools) - unleash Nuxt Developer Experience.
|
- [DevTools](https://github.com/nuxt/devtools) - unleash Nuxt Developer Experience.
|
||||||
|
|
||||||
## IDE
|
## IDE
|
||||||
|
|
||||||
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](https://vuejs.github.io/vetur/) if you have it).
|
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).
|
||||||
|
|
||||||
## Variations
|
## Variations
|
||||||
|
|
||||||
@@ -63,18 +68,18 @@ We recommend using [VS Code](https://code.visualstudio.com/) with [Volar](https:
|
|||||||
|
|
||||||
### Online
|
### Online
|
||||||
|
|
||||||
<a href="https://stackblitz.com/github/antfu/vitesse-nuxt"><img src="https://developer.stackblitz.com/img/open_in_stackblitz.svg" alt=""></a>
|
<a href="https://stackblitz.com/github/antfu/vitesse-nuxt3"><img src="https://developer.stackblitz.com/img/open_in_stackblitz.svg" alt=""></a>
|
||||||
|
|
||||||
### GitHub Template
|
### GitHub Template
|
||||||
|
|
||||||
[Create a repo from this template on GitHub](https://github.com/antfu/vitesse-nuxt/generate).
|
[Create a repo from this template on GitHub](https://github.com/antfu/vitesse-nuxt3/generate).
|
||||||
|
|
||||||
### Clone to local
|
### Clone to local
|
||||||
|
|
||||||
If you prefer to do it manually with the cleaner git history
|
If you prefer to do it manually with the cleaner git history
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npx degit antfu/vitesse-nuxt my-nuxt-app
|
npx degit antfu/vitesse-nuxt3 my-nuxt3-app
|
||||||
cd my-nuxt-app
|
cd my-nuxt3-app
|
||||||
pnpm i # If you don't have pnpm installed, run: npm install -g pnpm
|
pnpm i # If you don't have pnpm installed, run: npm install -g pnpm
|
||||||
```
|
```
|
||||||
@@ -1,31 +1,27 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { appName } from '~/constants'
|
import { appName } from '~/constants'
|
||||||
|
|
||||||
if (import.meta.client) {
|
|
||||||
import('@vitejs/devtools/client/inject')
|
|
||||||
}
|
|
||||||
|
|
||||||
useHead({
|
useHead({
|
||||||
title: appName,
|
title: appName,
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<VitePwaManifest />
|
||||||
<NuxtLayout>
|
<NuxtLayout>
|
||||||
<NuxtPage />
|
<NuxtPage />
|
||||||
</NuxtLayout>
|
</NuxtLayout>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
html,
|
html, body , #__nuxt{
|
||||||
body,
|
|
||||||
#__nuxt {
|
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
html.dark {
|
html.dark {
|
||||||
color-scheme: dark;
|
background: #222;
|
||||||
|
color: white;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
export const appName = 'Vitesse for Nuxt 4'
|
|
||||||
export const appDescription = 'Vitesse for Nuxt 4'
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
definePageMeta({
|
|
||||||
layout: 'home',
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<div>
|
|
||||||
<h1 text-xl>
|
|
||||||
Demo App
|
|
||||||
</h1>
|
|
||||||
<InputEntry />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
@@ -4,13 +4,13 @@ const { count, inc, dec } = useCount()
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div inline-flex m="y-3">
|
<div inline-flex m="y-3">
|
||||||
<button btn p-2 rounded-full @click="dec()">
|
<button rounded-full p-2 btn @click="dec()">
|
||||||
<div i-carbon-subtract />
|
<div i-carbon-subtract />
|
||||||
</button>
|
</button>
|
||||||
<div font="mono" w="15" m-auto inline-block>
|
<div font="mono" w="15" m-auto inline-block>
|
||||||
{{ count }}
|
{{ count }}
|
||||||
</div>
|
</div>
|
||||||
<button btn p-2 rounded-full @click="inc()">
|
<button rounded-full p-2 btn @click="inc()">
|
||||||
<div i-carbon-add />
|
<div i-carbon-add />
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
File renamed without changes.
File renamed without changes.
@@ -14,8 +14,7 @@ function go() {
|
|||||||
id="input"
|
id="input"
|
||||||
v-model="name"
|
v-model="name"
|
||||||
placeholder="What's your name?"
|
placeholder="What's your name?"
|
||||||
type="text"
|
type="text" autocomplete="off"
|
||||||
autocomplete="off"
|
|
||||||
p="x-4 y-2" m="t-5" w="250px"
|
p="x-4 y-2" m="t-5" w="250px"
|
||||||
text="center" bg="transparent"
|
text="center" bg="transparent"
|
||||||
border="~ rounded gray-200 dark:gray-700"
|
border="~ rounded gray-200 dark:gray-700"
|
||||||
@@ -24,7 +23,7 @@ function go() {
|
|||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<button
|
<button
|
||||||
text-sm btn m-3
|
m-3 text-sm btn
|
||||||
:disabled="!name"
|
:disabled="!name"
|
||||||
@click="go"
|
@click="go"
|
||||||
>
|
>
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div text-2xl font-300 inline-flex cursor-default>
|
<div inline-flex cursor-default text-2xl font-300>
|
||||||
<div flex flex-col children:mx-auto>
|
<div flex flex-col children:mx-auto>
|
||||||
<img h-18 w-18 inline-block src="/nuxt.svg">
|
<img inline-block h-18 w-18 src="/nuxt.svg">
|
||||||
<span text-green-400 mt--2>Nuxt 4</span>
|
<span mt--2 text-green5>Nuxt 3</span>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
text="3xl gray4"
|
text="3xl gray4"
|
||||||
@@ -10,8 +10,8 @@
|
|||||||
i-carbon-add transform transition-all-500 hover:rotate-135
|
i-carbon-add transform transition-all-500 hover:rotate-135
|
||||||
/>
|
/>
|
||||||
<div flex flex-col children:mx-auto>
|
<div flex flex-col children:mx-auto>
|
||||||
<img h-18 w-18 inline-block src="/vite.png">
|
<img inline-block h-18 w-18 src="/vite.png">
|
||||||
<span text-purple-500 mt--2>Vitesse</span>
|
<span mt--2 text-purple5>Vitesse</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -6,7 +6,7 @@ const time = useTimeAgo(() => data.value?.startAt || 0)
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div text-gray:80>
|
<div text-gray:80>
|
||||||
<span text-gray font-500>{{ data?.pageview }}</span>
|
<span font-500 text-gray>{{ data?.pageview }}</span>
|
||||||
page views since
|
page views since
|
||||||
<span text-gray>{{ time }}</span>
|
<span text-gray>{{ time }}</span>
|
||||||
</div>
|
</div>
|
||||||
File renamed without changes.
File renamed without changes.
@@ -1,5 +1,4 @@
|
|||||||
import type { ModuleOptions } from '@vite-pwa/nuxt'
|
import type { ModuleOptions } from '@vite-pwa/nuxt'
|
||||||
import process from 'node:process'
|
|
||||||
import { appDescription, appName } from '../constants/index'
|
import { appDescription, appName } from '../constants/index'
|
||||||
|
|
||||||
const scope = '/'
|
const scope = '/'
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
export const appName = 'Vitesse for Nuxt 3'
|
||||||
|
export const appDescription = 'Vitesse for Nuxt 3'
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
// @ts-check
|
|
||||||
import antfu from '@antfu/eslint-config'
|
|
||||||
import nuxt from './.nuxt/eslint.config.mjs'
|
|
||||||
|
|
||||||
export default antfu(
|
|
||||||
{
|
|
||||||
unocss: true,
|
|
||||||
formatters: true,
|
|
||||||
pnpm: true,
|
|
||||||
},
|
|
||||||
)
|
|
||||||
.append(nuxt())
|
|
||||||
@@ -4,7 +4,7 @@ Vue components in this dir are used as layouts.
|
|||||||
|
|
||||||
By default, `default.vue` will be used unless an alternative is specified in the route meta.
|
By default, `default.vue` will be used unless an alternative is specified in the route meta.
|
||||||
|
|
||||||
```vue
|
```html
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
definePageMeta({
|
definePageMeta({
|
||||||
layout: 'home',
|
layout: 'home',
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
<main class="px-10 py-20 text-center">
|
<main class="px-10 py-20 text-center">
|
||||||
<slot />
|
<slot />
|
||||||
<Footer />
|
<Footer />
|
||||||
<div class="text-sm mx-auto mt-5 text-center opacity-25">
|
<div class="mx-auto mt-5 text-center text-sm opacity-25">
|
||||||
[Default Layout]
|
[Default Layout]
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
<main class="px-10 py-20 text-center">
|
<main class="px-10 py-20 text-center">
|
||||||
<slot />
|
<slot />
|
||||||
<Footer />
|
<Footer />
|
||||||
<div class="text-sm mx-auto mt-5 text-center opacity-25">
|
<div class="mx-auto mt-5 text-center text-sm opacity-25">
|
||||||
[Home Layout]
|
[Home Layout]
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
import { addVitePlugin, defineNuxtModule } from '@nuxt/kit'
|
|
||||||
import { DevTools } from '@vitejs/devtools'
|
|
||||||
|
|
||||||
export default defineNuxtModule({
|
|
||||||
meta: {
|
|
||||||
name: 'vite',
|
|
||||||
},
|
|
||||||
setup() {
|
|
||||||
addVitePlugin(DevTools())
|
|
||||||
addVitePlugin({
|
|
||||||
name: 'nuxt:devtools',
|
|
||||||
devtools: {
|
|
||||||
setup(ctx) {
|
|
||||||
ctx.docks.register({
|
|
||||||
id: 'vitest',
|
|
||||||
type: 'iframe',
|
|
||||||
icon: 'https://vitest.dev/logo.svg',
|
|
||||||
title: 'Vitest',
|
|
||||||
url: 'http://localhost:51204/__vitest__/#/',
|
|
||||||
})
|
|
||||||
ctx.docks.register({
|
|
||||||
id: 'nuxt',
|
|
||||||
type: 'iframe',
|
|
||||||
icon: 'https://nuxt.com/assets/design-kit/icon-green.svg',
|
|
||||||
title: 'Nuxt',
|
|
||||||
url: '/__nuxt_devtools__/client/',
|
|
||||||
})
|
|
||||||
ctx.docks.register({
|
|
||||||
id: 'unocss',
|
|
||||||
type: 'iframe',
|
|
||||||
icon: 'https://unocss.dev/logo.svg',
|
|
||||||
title: 'Vitest',
|
|
||||||
url: '/__unocss',
|
|
||||||
})
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
},
|
|
||||||
})
|
|
||||||
+3
-3
@@ -1,10 +1,10 @@
|
|||||||
|
[build.environment]
|
||||||
|
NODE_VERSION = "16"
|
||||||
|
|
||||||
[build]
|
[build]
|
||||||
publish = "dist"
|
publish = "dist"
|
||||||
command = "pnpm run build"
|
command = "pnpm run build"
|
||||||
|
|
||||||
[build.environment]
|
|
||||||
NODE_VERSION = "20"
|
|
||||||
|
|
||||||
[[redirects]]
|
[[redirects]]
|
||||||
from = "/*"
|
from = "/*"
|
||||||
to = "/index.html"
|
to = "/index.html"
|
||||||
|
|||||||
+34
-46
@@ -1,4 +1,5 @@
|
|||||||
import { appDescription } from './app/constants/index'
|
import { pwa } from './config/pwa'
|
||||||
|
import { appDescription } from './constants/index'
|
||||||
|
|
||||||
export default defineNuxtConfig({
|
export default defineNuxtConfig({
|
||||||
modules: [
|
modules: [
|
||||||
@@ -6,11 +7,37 @@ export default defineNuxtConfig({
|
|||||||
'@unocss/nuxt',
|
'@unocss/nuxt',
|
||||||
'@pinia/nuxt',
|
'@pinia/nuxt',
|
||||||
'@nuxtjs/color-mode',
|
'@nuxtjs/color-mode',
|
||||||
'@nuxt/eslint',
|
'@vite-pwa/nuxt',
|
||||||
],
|
],
|
||||||
|
|
||||||
devtools: {
|
experimental: {
|
||||||
enabled: true,
|
// when using generate, payload js assets included in sw precache manifest
|
||||||
|
// but missing on offline, disabling extraction it until fixed
|
||||||
|
payloadExtraction: false,
|
||||||
|
inlineSSRStyles: false,
|
||||||
|
renderJsonPayloads: true,
|
||||||
|
// watcher: 'parcel',
|
||||||
|
},
|
||||||
|
|
||||||
|
css: [
|
||||||
|
'@unocss/reset/tailwind.css',
|
||||||
|
],
|
||||||
|
|
||||||
|
colorMode: {
|
||||||
|
classSuffix: '',
|
||||||
|
},
|
||||||
|
|
||||||
|
nitro: {
|
||||||
|
esbuild: {
|
||||||
|
options: {
|
||||||
|
target: 'esnext',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
prerender: {
|
||||||
|
crawlLinks: false,
|
||||||
|
routes: ['/'],
|
||||||
|
ignore: ['/hi'],
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
app: {
|
app: {
|
||||||
@@ -25,52 +52,13 @@ export default defineNuxtConfig({
|
|||||||
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
|
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
|
||||||
{ name: 'description', content: appDescription },
|
{ name: 'description', content: appDescription },
|
||||||
{ name: 'apple-mobile-web-app-status-bar-style', content: 'black-translucent' },
|
{ name: 'apple-mobile-web-app-status-bar-style', content: 'black-translucent' },
|
||||||
{ name: 'theme-color', media: '(prefers-color-scheme: light)', content: 'white' },
|
|
||||||
{ name: 'theme-color', media: '(prefers-color-scheme: dark)', content: '#222222' },
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
colorMode: {
|
pwa,
|
||||||
classSuffix: '',
|
|
||||||
},
|
|
||||||
|
|
||||||
future: {
|
devtools: {
|
||||||
compatibilityVersion: 4,
|
enabled: true,
|
||||||
},
|
|
||||||
|
|
||||||
experimental: {
|
|
||||||
// when using generate, payload js assets included in sw precache manifest
|
|
||||||
// but missing on offline, disabling extraction it until fixed
|
|
||||||
payloadExtraction: false,
|
|
||||||
renderJsonPayloads: true,
|
|
||||||
typedPages: true,
|
|
||||||
},
|
|
||||||
|
|
||||||
compatibilityDate: '2024-08-14',
|
|
||||||
|
|
||||||
nitro: {
|
|
||||||
esbuild: {
|
|
||||||
options: {
|
|
||||||
target: 'esnext',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
vite: {
|
|
||||||
build: {
|
|
||||||
rollupOptions: {
|
|
||||||
debug: {},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
eslint: {
|
|
||||||
config: {
|
|
||||||
standalone: false,
|
|
||||||
nuxt: {
|
|
||||||
sortConfigKeys: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
+25
-43
@@ -1,52 +1,34 @@
|
|||||||
{
|
{
|
||||||
"type": "module",
|
|
||||||
"private": true,
|
"private": true,
|
||||||
"packageManager": "pnpm@10.17.1",
|
"packageManager": "pnpm@8.5.1",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "nuxt build",
|
"build": "nuxi build",
|
||||||
"dev:pwa": "VITE_PLUGIN_PWA=true nuxt dev",
|
"dev": "nuxi dev",
|
||||||
"dev": "nuxt dev",
|
"dev:pwa": "VITE_PLUGIN_PWA=true nuxi dev",
|
||||||
"generate": "nuxt generate",
|
|
||||||
"prepare": "nuxt prepare",
|
|
||||||
"preview": "nuxt preview",
|
|
||||||
"start": "node .output/server/index.mjs",
|
"start": "node .output/server/index.mjs",
|
||||||
"start:generate": "npx serve .output/public",
|
"typecheck": "vue-tsc --noEmit",
|
||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
"test": "vitest",
|
"postinstall": "nuxi prepare",
|
||||||
"typecheck": "nuxt typecheck"
|
"generate": "nuxi generate",
|
||||||
|
"start:generate": "npx serve .output/public"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@antfu/eslint-config": "catalog:dev",
|
"@antfu/eslint-config": "^0.38.6",
|
||||||
"@iconify-json/carbon": "catalog:icons",
|
"@iconify-json/carbon": "^1.1.16",
|
||||||
"@iconify-json/twemoji": "catalog:icons",
|
"@iconify-json/twemoji": "^1.1.11",
|
||||||
"@nuxt/devtools": "catalog:build",
|
"@nuxt/devtools": "npm:@nuxt/devtools-edge@latest",
|
||||||
"@nuxt/eslint": "catalog:build",
|
"@nuxtjs/color-mode": "^3.2.0",
|
||||||
"@nuxt/kit": "catalog:build",
|
"@parcel/watcher": "^2.1.0",
|
||||||
"@nuxtjs/color-mode": "catalog:build",
|
"@pinia/nuxt": "^0.4.11",
|
||||||
"@pinia/nuxt": "catalog:build",
|
"@unocss/eslint-config": "^0.51.13",
|
||||||
"@pnpm/logger": "catalog:",
|
"@unocss/nuxt": "^0.51.13",
|
||||||
"@unocss/eslint-config": "catalog:build",
|
"@vite-pwa/nuxt": "^0.0.8",
|
||||||
"@unocss/nuxt": "catalog:build",
|
"@vueuse/nuxt": "^10.1.2",
|
||||||
"@vite-pwa/nuxt": "catalog:build",
|
"consola": "^3.1.0",
|
||||||
"@vitejs/devtools": "catalog:",
|
"eslint": "^8.40.0",
|
||||||
"@vitest/ui": "catalog:",
|
"nuxt": "^3.5.0",
|
||||||
"@vueuse/core": "catalog:frontend",
|
"pinia": "^2.1.1",
|
||||||
"@vueuse/nuxt": "catalog:build",
|
"typescript": "^5.0.4",
|
||||||
"eslint": "catalog:dev",
|
"vue-tsc": "^1.6.5"
|
||||||
"eslint-plugin-format": "catalog:dev",
|
|
||||||
"nuxt": "catalog:build",
|
|
||||||
"pinia": "catalog:frontend",
|
|
||||||
"typescript": "catalog:dev",
|
|
||||||
"unocss": "catalog:build",
|
|
||||||
"vitest": "catalog:",
|
|
||||||
"vue": "catalog:frontend",
|
|
||||||
"vue-tsc": "catalog:dev"
|
|
||||||
},
|
|
||||||
"resolutions": {
|
|
||||||
"@nuxt/devtools": "catalog:build",
|
|
||||||
"@nuxt/kit": "catalog:build",
|
|
||||||
"nuxt": "catalog:build",
|
|
||||||
"unplugin": "catalog:build",
|
|
||||||
"vite": "catalog:build"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
File renamed without changes.
@@ -1,5 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
const route = useRoute<'hi-id'>()
|
const route = useRoute()
|
||||||
const user = useUserStore()
|
const user = useUserStore()
|
||||||
const name = route.params.id
|
const name = route.params.id
|
||||||
|
|
||||||
@@ -14,7 +14,7 @@ definePageMeta({
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div i-twemoji:waving-hand text-4xl inline-block animate-shake-x animate-duration-5000 />
|
<div i-twemoji:waving-hand inline-block animate-shake-x animate-duration-5000 text-4xl />
|
||||||
<h3 text-2xl font-500>
|
<h3 text-2xl font-500>
|
||||||
Hi,
|
Hi,
|
||||||
</h3>
|
</h3>
|
||||||
@@ -23,7 +23,7 @@ definePageMeta({
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<template v-if="user.otherNames.length">
|
<template v-if="user.otherNames.length">
|
||||||
<div text-sm my-4>
|
<p my-4 text-sm>
|
||||||
<span op-50>Also as known as:</span>
|
<span op-50>Also as known as:</span>
|
||||||
<ul>
|
<ul>
|
||||||
<li v-for="otherName in user.otherNames" :key="otherName">
|
<li v-for="otherName in user.otherNames" :key="otherName">
|
||||||
@@ -32,14 +32,14 @@ definePageMeta({
|
|||||||
</router-link>
|
</router-link>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</p>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<Counter />
|
<Counter />
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<NuxtLink
|
<NuxtLink
|
||||||
class="text-sm btn m-3"
|
class="m-3 text-sm btn"
|
||||||
to="/"
|
to="/"
|
||||||
>
|
>
|
||||||
Back
|
Back
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
const online = useOnline()
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<Logos mb-6 />
|
||||||
|
<Suspense>
|
||||||
|
<ClientOnly>
|
||||||
|
<PageView v-if="online" />
|
||||||
|
<div v-else text-gray:80>
|
||||||
|
You're offline
|
||||||
|
</div>
|
||||||
|
</ClientOnly>
|
||||||
|
<template #fallback>
|
||||||
|
<div italic op50>
|
||||||
|
<span animate-pulse>Loading...</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</Suspense>
|
||||||
|
<InputEntry />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
Generated
+8652
-11869
File diff suppressed because it is too large.
Load diff
@@ -1,41 +0,0 @@
|
|||||||
packages: []
|
|
||||||
|
|
||||||
catalog:
|
|
||||||
'@pnpm/logger': ^1001.0.0
|
|
||||||
'@vitejs/devtools': 0.0.0-alpha.6
|
|
||||||
'@vitest/ui': ^3.2.4
|
|
||||||
vitest: ^3.2.4
|
|
||||||
|
|
||||||
catalogs:
|
|
||||||
build:
|
|
||||||
'@nuxt/devtools': ^2.6.5
|
|
||||||
'@nuxt/eslint': ^1.9.0
|
|
||||||
'@nuxt/kit': ^4.1.2
|
|
||||||
'@nuxtjs/color-mode': ^3.5.2
|
|
||||||
'@pinia/nuxt': ^0.11.2
|
|
||||||
'@unocss/eslint-config': ^66.5.2
|
|
||||||
'@unocss/nuxt': ^66.5.2
|
|
||||||
'@vite-pwa/nuxt': ^1.0.4
|
|
||||||
'@vueuse/nuxt': ^13.9.0
|
|
||||||
nuxt: ^4.1.2
|
|
||||||
unocss: ^66.5.2
|
|
||||||
unplugin: ^2.3.10
|
|
||||||
vite: npm:rolldown-vite@^7.1.14
|
|
||||||
dev:
|
|
||||||
'@antfu/eslint-config': ^5.4.1
|
|
||||||
eslint: ^9.36.0
|
|
||||||
eslint-plugin-format: ^1.0.2
|
|
||||||
typescript: ^5.9.3
|
|
||||||
vue-tsc: ^3.1.0
|
|
||||||
frontend:
|
|
||||||
'@vueuse/core': ^13.9.0
|
|
||||||
pinia: ^3.0.3
|
|
||||||
vue: ^3.5.22
|
|
||||||
icons:
|
|
||||||
'@iconify-json/carbon': ^1.2.13
|
|
||||||
'@iconify-json/twemoji': ^1.2.4
|
|
||||||
|
|
||||||
onlyBuiltDependencies:
|
|
||||||
- '@parcel/watcher'
|
|
||||||
- esbuild
|
|
||||||
- unrs-resolver
|
|
||||||
+2
-4
@@ -1,11 +1,10 @@
|
|||||||
import { createLocalFontProcessor } from '@unocss/preset-web-fonts/local'
|
|
||||||
import {
|
import {
|
||||||
defineConfig,
|
defineConfig,
|
||||||
presetAttributify,
|
presetAttributify,
|
||||||
presetIcons,
|
presetIcons,
|
||||||
presetTypography,
|
presetTypography,
|
||||||
|
presetUno,
|
||||||
presetWebFonts,
|
presetWebFonts,
|
||||||
presetWind4,
|
|
||||||
transformerDirectives,
|
transformerDirectives,
|
||||||
transformerVariantGroup,
|
transformerVariantGroup,
|
||||||
} from 'unocss'
|
} from 'unocss'
|
||||||
@@ -16,7 +15,7 @@ export default defineConfig({
|
|||||||
['icon-btn', 'inline-block cursor-pointer select-none opacity-75 transition duration-200 ease-in-out hover:opacity-100 hover:text-teal-600'],
|
['icon-btn', 'inline-block cursor-pointer select-none opacity-75 transition duration-200 ease-in-out hover:opacity-100 hover:text-teal-600'],
|
||||||
],
|
],
|
||||||
presets: [
|
presets: [
|
||||||
presetWind4(),
|
presetUno(),
|
||||||
presetAttributify(),
|
presetAttributify(),
|
||||||
presetIcons({
|
presetIcons({
|
||||||
scale: 1.2,
|
scale: 1.2,
|
||||||
@@ -28,7 +27,6 @@ export default defineConfig({
|
|||||||
serif: 'DM Serif Display',
|
serif: 'DM Serif Display',
|
||||||
mono: 'DM Mono',
|
mono: 'DM Mono',
|
||||||
},
|
},
|
||||||
processors: createLocalFontProcessor(),
|
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
transformers: [
|
transformers: [
|
||||||
|
|||||||
Reference in new issue
Block a user