Skip to content

Commit

Permalink
feat: add PWA config (#35)
Browse files Browse the repository at this point in the history
* feat: add pwa config

* fix: update menifest description
  • Loading branch information
onamkrverma authored Sep 29, 2023
1 parent 66ddbd3 commit 213bfd2
Show file tree
Hide file tree
Showing 9 changed files with 1,774 additions and 13 deletions.
3 changes: 2 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#000000" />
<script
async
src="https://umami.curiosta.com/script.js"
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"tailwindcss": "^3.3.3",
"typescript": "^5.1.6",
"vite": "^4.3.2",
"vite-aliases": "^0.11.2"
"vite-aliases": "^0.11.2",
"vite-plugin-pwa": "^0.16.5"
}
}
Binary file added public/android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/android-chrome-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon.ico
Binary file not shown.
Binary file added public/maskable_icon_x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
50 changes: 49 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,56 @@
import { defineConfig } from "vite";
import preact from "@preact/preset-vite";
import { ViteAliases } from "vite-aliases";
import { VitePWA } from "vite-plugin-pwa";

// https://vitejs.dev/config/
export default defineConfig({
plugins: [preact(), ViteAliases({ prefix: "@" })],
plugins: [
preact(),
ViteAliases({ prefix: "@" }),
VitePWA({
registerType: "autoUpdate",
includeAssets: [
"favicon.ico",
"apple-touch-icon.png",
"android-chrome-192x192.png",
],
manifest: {
name: "Curiosta makers",
short_name: "curiosta makers",
description:
"Curiosta makers is a comprehensive platform for managing makerspaces",
theme_color: "#ffffff",
icons: [
{
src: "android-chrome-192x192.png",
sizes: "192x192",
type: "image/png",
},
{
src: "android-chrome-512x512.png",
sizes: "512x512",
type: "image/png",
},
{
src: "maskable_icon_x512.png",
sizes: "512x512",
type: "image/png",
purpose: "any",
},
{
src: "maskable_icon_x512.png",
sizes: "512x512",
type: "image/png",
purpose: "maskable",
},
],
background_color: "#ffffff",
display: "standalone",
scope: "/",
start_url: "/",
orientation: "portrait",
},
}),
],
});
1,731 changes: 1,721 additions & 10 deletions yarn.lock

Large diffs are not rendered by default.

0 comments on commit 213bfd2

Please sign in to comment.