Skip to content

Commit

Permalink
Add pwa
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeDoctorDE committed Jan 9, 2025
1 parent c24d6f8 commit 389e920
Show file tree
Hide file tree
Showing 14 changed files with 4,032 additions and 746 deletions.
12 changes: 6 additions & 6 deletions app/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,10 @@ packages:
dependency: transitive
description:
name: camera_platform_interface
sha256: b3ede1f171532e0d83111fe0980b46d17f1aa9788a07a2fbed07366bbdbb9061
sha256: "953e7baed3a7c8fae92f7200afeb2be503ff1a17c3b4e4ed7b76f008c2810a31"
url: "https://pub.dev"
source: hosted
version: "2.8.0"
version: "2.9.0"
camera_web:
dependency: transitive
description:
Expand Down Expand Up @@ -569,10 +569,10 @@ packages:
dependency: "direct main"
description:
name: flutter_svg
sha256: "54900a1a1243f3c4a5506d853a2b5c2dbc38d5f27e52a52618a8054401431123"
sha256: c200fd79c918a40c5cd50ea0877fa13f81bdaf6f0a5d3dbcc2a13e3285d6aa1b
url: "https://pub.dev"
source: hosted
version: "2.0.16"
version: "2.0.17"
flutter_test:
dependency: "direct dev"
description: flutter
Expand Down Expand Up @@ -1517,10 +1517,10 @@ packages:
dependency: transitive
description:
name: vector_graphics_codec
sha256: "2430b973a4ca3c4dbc9999b62b8c719a160100dcbae5c819bae0cacce32c9cdb"
sha256: "99fd9fbd34d9f9a32efd7b6a6aae14125d8237b10403b422a6a6dfeac2806146"
url: "https://pub.dev"
source: hosted
version: "1.1.12"
version: "1.1.13"
vector_graphics_compiler:
dependency: transitive
description:
Expand Down
18 changes: 18 additions & 0 deletions docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import react from "@astrojs/react";
import { getSidebarTranslatedLabel } from "./src/translations";
import remarkHeadingID from "remark-heading-id";
import remarkGemoji from "remark-gemoji";
import AstroPWA from "@vite-pwa/astro";
import manifest from "./webmanifest.json";

// https://astro.build/config
export default defineConfig({
Expand Down Expand Up @@ -340,6 +342,22 @@ export default defineConfig({
},
},
}),
AstroPWA({
workbox: {
skipWaiting: true,
clientsClaim: true,
navigateFallback: "/404",
ignoreURLParametersMatching: [/./],
globPatterns: [
"**/*.{html,js,css,png,svg,json,ttf,pf_fragment,pf_index,pf_meta,pagefind,wasm}",
],
},
experimental: {
directoryAndTrailingSlashHandler: true,
},
registerType: "autoUpdate",
manifest,
}),
react(),
],
});
13 changes: 8 additions & 5 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,21 @@
"@astrojs/react": "^4.1.2",
"@astrojs/starlight": "^0.30.5",
"@phosphor-icons/react": "^2.1.7",
"@types/react": "^19.0.3",
"@types/react": "^19.0.4",
"@types/react-dom": "^19.0.2",
"astro": "^5.1.3",
"astro": "^5.1.4",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"remark-gemoji": "^8.0.0",
"remark-heading-id": "^1.0.1",
"sharp": "^0.33.5",
"typescript": "^5.7.2"
"typescript": "^5.7.3"
},
"packageManager": "[email protected]",
"devDependencies": {
"sass": "^1.83.1"
"@vite-pwa/astro": "^0.5.0",
"sass": "^1.83.1",
"sharp": "^0.33.5",
"vite-plugin-pwa": "^0.21.1",
"workbox-window": "^7.3.0"
}
}
Loading

0 comments on commit 389e920

Please sign in to comment.