Remove PWA related baggage, linting
This commit is contained in:
parent
3cb7a8e572
commit
fbebbefb80
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,3 +7,4 @@ node_modules
|
||||
.output
|
||||
.env
|
||||
dist
|
||||
.eslintcache
|
||||
|
@ -1,10 +1,8 @@
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { defineConfig } from "vitepress";
|
||||
import { withPwa } from "@vite-pwa/vitepress";
|
||||
import UnoCSS from "unocss/vite";
|
||||
import { presetUno, presetAttributify, presetIcons } from "unocss";
|
||||
import { commitRef, meta, socials } from "./constants";
|
||||
import { pwa } from "./pwa";
|
||||
import { generateImages, generateMeta } from "./hooks";
|
||||
import { toggleStarredPlugin } from "./markdown/toggleStarred";
|
||||
import { base64DecodePlugin } from "./markdown/base64";
|
||||
@ -131,6 +129,5 @@ export default defineConfig({
|
||||
{ text: "📦 Storage", link: "/storage" },
|
||||
],
|
||||
socialLinks: socials,
|
||||
...pwa,
|
||||
},
|
||||
});
|
||||
|
@ -1,102 +0,0 @@
|
||||
import type { PwaOptions } from "@vite-pwa/vitepress";
|
||||
import { meta } from "./constants";
|
||||
import { resolve } from "pathe";
|
||||
import fg from "fast-glob";
|
||||
|
||||
export const pwa = {
|
||||
outDir: ".vitepress/dist",
|
||||
registerType: "autoUpdate",
|
||||
includeManifestIcons: false,
|
||||
includeAssets: fg.sync("**/*.{png,webp,svg,gif,ico,txt}", {
|
||||
cwd: resolve(__dirname, "../public"),
|
||||
}),
|
||||
|
||||
manifest: {
|
||||
id: "/",
|
||||
name: meta.name,
|
||||
short_name: meta.name,
|
||||
description: meta.description,
|
||||
theme_color: "#ffffff",
|
||||
start_url: "/",
|
||||
lang: "en-US",
|
||||
dir: "ltr",
|
||||
orientation: "natural",
|
||||
display: "standalone",
|
||||
display_override: ["window-controls-overlay"],
|
||||
categories: meta.keywords,
|
||||
// TODO: replace with actual icons
|
||||
icons: [
|
||||
{
|
||||
src: "test.png",
|
||||
sizes: "64x64",
|
||||
type: "image/png",
|
||||
},
|
||||
{
|
||||
src: "test.png",
|
||||
sizes: "192x192",
|
||||
type: "image/png",
|
||||
},
|
||||
{
|
||||
src: "test.png",
|
||||
sizes: "512x512",
|
||||
type: "image/png",
|
||||
purpose: "any",
|
||||
},
|
||||
{
|
||||
src: "maskable-icon.png",
|
||||
sizes: "512x512",
|
||||
type: "image/png",
|
||||
purpose: "maskable",
|
||||
},
|
||||
],
|
||||
handle_links: "preferred",
|
||||
launch_handler: {
|
||||
client_mode: ["navigate-existing", "auto"],
|
||||
},
|
||||
edge_side_panel: {
|
||||
preferred_width: 480,
|
||||
},
|
||||
},
|
||||
experimental: {
|
||||
includeAllowlist: true,
|
||||
},
|
||||
workbox: {
|
||||
globPatterns: ["**/*.{css,js,html,svg,png,ico,txt,woff2,json}"],
|
||||
globIgnores: ["**/404.html"],
|
||||
navigateFallback: null,
|
||||
runtimeCaching: [
|
||||
{
|
||||
urlPattern: /^https:\/\/fonts\.googleapis\.com\/.*/i,
|
||||
handler: "CacheFirst",
|
||||
options: {
|
||||
cacheName: "google-fonts-cache",
|
||||
expiration: {
|
||||
maxEntries: 10,
|
||||
maxAgeSeconds: 60 * 60 * 24 * 365, // <== 365 days
|
||||
},
|
||||
cacheableResponse: {
|
||||
statuses: [0, 200],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
urlPattern: /^https:\/\/fonts\.gstatic\.com\/.*/i,
|
||||
handler: "CacheFirst",
|
||||
options: {
|
||||
cacheName: "gstatic-fonts-cache",
|
||||
expiration: {
|
||||
maxEntries: 10,
|
||||
maxAgeSeconds: 60 * 60 * 24 * 365, // <== 365 days
|
||||
},
|
||||
cacheableResponse: {
|
||||
statuses: [0, 200],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
devOptions: {
|
||||
enabled: true,
|
||||
suppressWarnings: false,
|
||||
},
|
||||
} satisfies PwaOptions;
|
@ -1,11 +1,9 @@
|
||||
import { type Theme, inBrowser } from "vitepress";
|
||||
import { type Theme } from "vitepress";
|
||||
import DefaultTheme from "vitepress/theme";
|
||||
import Layout from "./Layout.vue";
|
||||
import "./style.css";
|
||||
import "uno.css";
|
||||
|
||||
// if (inBrowser) import("./pwa");
|
||||
|
||||
export default {
|
||||
extends: DefaultTheme,
|
||||
Layout: Layout,
|
||||
|
@ -1,3 +0,0 @@
|
||||
import { registerSW } from "virtual:pwa-register";
|
||||
|
||||
registerSW({ immediate: true });
|
@ -18,7 +18,6 @@
|
||||
"dependencies": {
|
||||
"@headlessui/vue": "^1.7.16",
|
||||
"@resvg/resvg-js": "^2.6.0",
|
||||
"fast-glob": "^3.3.1",
|
||||
"itty-fetcher": "^0.9.4",
|
||||
"nitro-cors": "^0.7.0",
|
||||
"nitropack": "latest",
|
||||
@ -26,16 +25,14 @@
|
||||
"unocss": "^0.57.1",
|
||||
"vitepress": "1.0.0-rc.25",
|
||||
"vue": "^3.3.7",
|
||||
"workbox-window": "^7.0.0",
|
||||
"x-satori": "^0.1.5",
|
||||
"zod": "^3.22.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@iconify-json/carbon": "^1.1.21",
|
||||
"@iconify-json/twemoji": "^1.1.12",
|
||||
"@taskylizard/eslint-config": "^1.0.1",
|
||||
"@taskylizard/eslint-config": "^1.0.3",
|
||||
"@types/node": "^20.8.9",
|
||||
"@vite-pwa/vitepress": "^0.2.3",
|
||||
"eslint": "^8.53.0",
|
||||
"prettier": "^3.0.3"
|
||||
},
|
||||
|
1645
pnpm-lock.yaml
generated
1645
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user