Switch to Vite
This commit is contained in:
parent
2c3dcc9c1a
commit
c44f07a576
24 changed files with 298 additions and 4612 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -1,7 +1,6 @@
|
|||
.idea/
|
||||
/node_modules/
|
||||
/dist/
|
||||
|
||||
*.log
|
||||
.nuxt
|
||||
nuxt.d.ts
|
||||
.output
|
||||
.env
|
||||
|
|
|
@ -4,5 +4,3 @@
|
|||
|
||||
TODO:
|
||||
- Blog
|
||||
- Legal Notice
|
||||
- Terms
|
||||
|
|
25
index.html
Normal file
25
index.html
Normal file
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<title>Moritz Ruth</title>
|
||||
<link rel="preload" as="font" href="/node_modules/@fontsource/plus-jakarta-sans/files/plus-jakarta-sans-latin-400-normal.woff2" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="/node_modules/@fontsource/plus-jakarta-sans/400.css">
|
||||
<link rel="stylesheet" href="/node_modules/@fontsource/plus-jakarta-sans/700.css">
|
||||
<meta name="description" content="freelance software developer, graphic design enthusiast and hobby photographer">
|
||||
<meta name="keywords" content="web, dev, development, coding, moritz, ruth, development, design, kotlin, android">
|
||||
<link rel="shortcut icon" type="image/png" href="/icon.png">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
<script
|
||||
async
|
||||
defer
|
||||
src="https://stats.moritzruth.de/umami.js"
|
||||
data-website-id="e68ac4a6-c999-4f8e-be75-5a6252a55f17"
|
||||
data-domains="moritzruth.de"
|
||||
></script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,23 +0,0 @@
|
|||
import { defineNuxtConfig } from "nuxt3"
|
||||
|
||||
// https://v3.nuxtjs.org/docs/directory-structure/nuxt.config
|
||||
export default defineNuxtConfig({
|
||||
ssr: true,
|
||||
target: "static",
|
||||
buildModules: [
|
||||
"nuxt-windicss",
|
||||
"unplugin-icons/nuxt"
|
||||
],
|
||||
css: [
|
||||
"@fontsource/plus-jakarta-sans/400.css",
|
||||
"@fontsource/plus-jakarta-sans/700.css"
|
||||
],
|
||||
build: {
|
||||
loaders: {
|
||||
css: {
|
||||
// @ts-expect-error
|
||||
module: false
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
23
package.json
23
package.json
|
@ -2,25 +2,30 @@
|
|||
"name": "moritzruth.de",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "nuxi dev",
|
||||
"build": "NITRO_PRESET=server nuxi build",
|
||||
"start": "node .output/server/index.mjs",
|
||||
"fi": "pnpm i --shamefully-hoist"
|
||||
"dev": "vite --host",
|
||||
"build": "vite build",
|
||||
"start": "vite preview",
|
||||
"lint": "eslint . --fix"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vitejs/plugin-vue": "^2.0.1",
|
||||
"@vue/compiler-sfc": "^3.1.1",
|
||||
"eslint": "^7.32.0",
|
||||
"eslint-config-awzzm-vue": "^2.0.1",
|
||||
"nuxt-windicss": "^2.1.1",
|
||||
"nuxt3": "latest",
|
||||
"typescript": "^4.5.3",
|
||||
"typescript": "^4.5.4",
|
||||
"vite": "^2.3.7",
|
||||
"vite-plugin-pages": "^0.19.4",
|
||||
"vite-plugin-windicss": "^1.0.4",
|
||||
"windicss": "^3.2.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fontsource/plus-jakarta-sans": "^4.5.0",
|
||||
"@iconify/json": "^1.1.441",
|
||||
"@iconify/json": "1.1.444",
|
||||
"@vueuse/core": "^7.2.2",
|
||||
"@vueuse/head": "^0.7.4",
|
||||
"blobs": "^2.2.1-beta.1",
|
||||
"unplugin-icons": "^0.12.23",
|
||||
"vue": "^3.2.26"
|
||||
"vue": "^3.2.26",
|
||||
"vue-router": "^4.0.12"
|
||||
}
|
||||
}
|
||||
|
|
4745
pnpm-lock.yaml
generated
4745
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div class="h-100vh w-100vw text-light-100 overflow-x-hidden">
|
||||
<NuxtPage/>
|
||||
<router-view/>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -24,9 +24,9 @@
|
|||
|
||||
</style>
|
||||
|
||||
<script lang="ts">
|
||||
<script>
|
||||
import ArrowLeftIcon from "~icons/ph/arrow-left"
|
||||
import { useMeta } from "#meta"
|
||||
import { useHead } from "@vueuse/head"
|
||||
|
||||
export default {
|
||||
name: "TopBarLayout",
|
||||
|
@ -42,7 +42,7 @@
|
|||
}
|
||||
},
|
||||
setup(props) {
|
||||
useMeta({
|
||||
useHead({
|
||||
title: `${props.title} — Moritz Ruth`
|
||||
})
|
||||
}
|
23
src/main.ts
Normal file
23
src/main.ts
Normal file
|
@ -0,0 +1,23 @@
|
|||
import "virtual:windi.css"
|
||||
import routes from "~pages"
|
||||
import { createApp } from "vue"
|
||||
import { createRouter, createWebHistory } from "vue-router"
|
||||
import App from "./App.vue"
|
||||
import { createHead } from "@vueuse/head"
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(),
|
||||
routes,
|
||||
scrollBehavior(to, from, savedPosition) {
|
||||
if (savedPosition) return savedPosition
|
||||
if (to.hash) return { el: to.hash }
|
||||
return { top: 0 }
|
||||
}
|
||||
})
|
||||
|
||||
const head = createHead()
|
||||
|
||||
createApp(App)
|
||||
.use(router)
|
||||
.use(head)
|
||||
.mount("#app")
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
</style>
|
||||
|
||||
<script lang="ts">
|
||||
<script>
|
||||
import TopBarLayout from "../components/TopBarLayout.vue"
|
||||
import LinkCardList from "../components/LinkCardList.vue"
|
||||
import BlurredBlobCanvas from "../components/BlurredBlobCanvas.vue"
|
|
@ -96,7 +96,7 @@
|
|||
import BlurredBlobCanvas from "../components/BlurredBlobCanvas.vue"
|
||||
import XSpacer from "../components/XSpacer.vue"
|
||||
import LinkCardList from "../components/LinkCardList.vue"
|
||||
import { useMeta } from "#meta"
|
||||
import { useHead } from "@vueuse/head"
|
||||
|
||||
const NAVIGATION_LINKS = [
|
||||
{
|
||||
|
@ -134,7 +134,7 @@
|
|||
BlurredBlobCanvas
|
||||
},
|
||||
setup() {
|
||||
useMeta({
|
||||
useHead({
|
||||
title: "Moritz Ruth — freelance software developer"
|
||||
})
|
||||
|
|
@ -33,8 +33,8 @@
|
|||
|
||||
<script lang="ts">
|
||||
import TopBarLayout from "../components/TopBarLayout.vue"
|
||||
import { photos } from "assets/photos"
|
||||
import XSpacer from "~/components/XSpacer.vue"
|
||||
import { photos } from "../photos"
|
||||
import XSpacer from "../components/XSpacer.vue"
|
||||
|
||||
export default {
|
||||
name: "PhotographyPage",
|
|
@ -10,16 +10,16 @@
|
|||
|
||||
</style>
|
||||
|
||||
<script lang="ts">
|
||||
<script>
|
||||
import TopBarLayout from "../components/TopBarLayout.vue"
|
||||
import ArrowRightIcon from "~icons/ph/arrow-right"
|
||||
import LinkCardList, { Link } from "../components/LinkCardList.vue"
|
||||
import LinkCardList from "../components/LinkCardList.vue"
|
||||
|
||||
export default {
|
||||
name: "ProjectsPage",
|
||||
components: { LinkCardList, TopBarLayout, ArrowRightIcon },
|
||||
setup() {
|
||||
const projects: Link[] = [
|
||||
const projects = [
|
||||
{
|
||||
label: "JamRSS",
|
||||
description: "An RSS reader app for Android, built with Jetpack\u00A0Compose.",
|
3
src/vite-env.d.ts
vendored
Normal file
3
src/vite-env.d.ts
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
/// <reference types="vite-plugin-pages/client"/>
|
||||
/// <reference types="unplugin-icons/types/vue"/>
|
||||
/// <reference types="vite/client"/>
|
|
@ -1,10 +1,14 @@
|
|||
{
|
||||
// https://v3.nuxtjs.org/concepts/typescript
|
||||
"extends": "./.nuxt/tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"types": [
|
||||
"nuxt-windicss",
|
||||
"unplugin-icons/types/vue"
|
||||
]
|
||||
"baseUrl": ".",
|
||||
"module": "ESNext",
|
||||
"lib": ["DOM", "ESNext", "es2020"],
|
||||
"strict": true,
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true,
|
||||
"moduleResolution": "node",
|
||||
"resolveJsonModule": true,
|
||||
"strictNullChecks": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
}
|
||||
}
|
||||
|
|
14
vite.config.ts
Normal file
14
vite.config.ts
Normal file
|
@ -0,0 +1,14 @@
|
|||
import { defineConfig } from "vite"
|
||||
import vuePlugin from "@vitejs/plugin-vue"
|
||||
import windicssPlugin from "vite-plugin-windicss"
|
||||
import pagesPlugin from "vite-plugin-pages"
|
||||
import iconsPlugin from "unplugin-icons/vite"
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
vuePlugin(),
|
||||
pagesPlugin(),
|
||||
windicssPlugin(),
|
||||
iconsPlugin()
|
||||
]
|
||||
})
|
7
webstorm-shims.d.ts
vendored
7
webstorm-shims.d.ts
vendored
|
@ -1,7 +0,0 @@
|
|||
// Taken from https://github.com/antfu/unplugin-icons/issues/128#issuecomment-992718883
|
||||
|
||||
declare module "~icons/*" {
|
||||
import { FunctionalComponent, SVGAttributes } from "vue"
|
||||
const component: FunctionalComponent<SVGAttributes>
|
||||
export default component
|
||||
}
|
Loading…
Add table
Reference in a new issue