Skip to content

Commit

Permalink
test sw
Browse files Browse the repository at this point in the history
  • Loading branch information
Yusef Almamari committed Aug 13, 2024
1 parent d1b50b4 commit 7d5d510
Show file tree
Hide file tree
Showing 8 changed files with 2,722 additions and 392 deletions.
2 changes: 0 additions & 2 deletions .env.development

This file was deleted.

2 changes: 0 additions & 2 deletions .env.production

This file was deleted.

2,867 changes: 2,667 additions & 200 deletions package-lock.json

Large diffs are not rendered by default.

19 changes: 4 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,7 @@
"react-redux": "^9.1.2",
"react-router-dom": "^6.21.1",
"react-window": "^1.8.10",
"tailwindcss": "^3.4.6",
"web-vitals": "^2.1.4",
"workbox-background-sync": "^6.6.0",
"workbox-broadcast-update": "^6.6.0",
"workbox-cacheable-response": "^6.6.0",
"workbox-core": "^6.6.0",
"workbox-expiration": "^6.6.0",
"workbox-google-analytics": "^6.6.1",
"workbox-navigation-preload": "^6.6.0",
"workbox-precaching": "^6.6.0",
"workbox-range-requests": "^6.6.0",
"workbox-routing": "^6.6.0",
"workbox-strategies": "^6.6.0",
"workbox-streams": "^6.6.0"
"tailwindcss": "^3.4.6"
},
"devDependencies": {
"@eslint/js": "^9.6.0",
Expand Down Expand Up @@ -82,7 +69,9 @@
"react-dom": "^18.3.1",
"typescript": "^5.5.3",
"vite": "^5.3.4",
"vite-plugin-eslint": "^1.8.1"
"vite-plugin-eslint": "^1.8.1",
"vite-plugin-pwa": "^0.20.1",
"workbox-core": "^7.1.0"
},
"overrides": {
"typescript": "^5.5.3"
Expand Down
28 changes: 0 additions & 28 deletions public/manifest.json

This file was deleted.

44 changes: 0 additions & 44 deletions src/service-worker.js

This file was deleted.

100 changes: 0 additions & 100 deletions src/serviceWorkerRegistration.js

This file was deleted.

52 changes: 51 additions & 1 deletion vite.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import eslint from "vite-plugin-eslint";
import { VitePWA } from "vite-plugin-pwa";

export default defineConfig(() => {
return {
Expand All @@ -15,6 +16,55 @@ export default defineConfig(() => {
assetsDir: ".",
},

plugins: [react(), eslint()],
plugins: [
react(),
eslint(),
VitePWA({
strategies: "generateSW",
registerType: "autoUpdate",
injectRegister: true,
pwaAssets: { disabled: false, config: true, htmlPreset: "2023", overrideManifestIcons: true },
manifest: {
short_name: "CiteEase",
name: "CiteEase: Your Citation Companion",
description:
"CiteEase is a powerful and user-friendly open-source citation management app designed for students, researchers, and anyone who values efficiency and organization.",
icons: [
{
src: "/citeease/favicon.ico",
sizes: "64x64 32x32 24x24 16x16",
type: "image/x-icon",
},
{
src: "/citeease/images/favicons/android-chrome-192x192.png",
sizes: "192x192",
type: "image/png",
},
{
src: "/citeease/images/favicons/android-chrome-512x512.png",
sizes: "512x512",
type: "image/png",
},
],
scope: "/citeease/",
start_url: "/citeease/",
display: "standalone",
orientation: "portrait",
theme_color: "#ffffff",
background_color: "#ffffff",
},
workbox: {
globPatterns: ["**/*.{js,css,html,svg,png,svg,ico}"],
cleanupOutdatedCaches: true,
clientsClaim: true,
},
injectManifest: {
globPatterns: ["**/*.{js,css,html,svg,png,svg,ico}"],
},
devOptions: {
enabled: true,
},
}),
],
};
});

0 comments on commit 7d5d510

Please sign in to comment.