Skip to content

Commit

Permalink
try to implement pwa (#5)
Browse files Browse the repository at this point in the history
* feature: generate icons && add manifest && update vite.config.js

* fix: move icons
  • Loading branch information
nogorka authored May 5, 2024
1 parent 7fbaa09 commit 8c2774a
Show file tree
Hide file tree
Showing 20 changed files with 521 additions and 48 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="icon" href="/favicon.svg">
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vite App</title>
</head>
Expand Down
469 changes: 426 additions & 43 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@
"lrm-graphhopper": "^1.3.0",
"papaparse": "^5.4.1",
"primeicons": "^7.0.0",
"vite-plugin-pwa": "^0.19.8",
"vue": "^3.4.21",
"vue-pwa-asset-generator": "^1.7.3",
"vue-qrcode-reader": "^5.5.4",
"vue-router": "^4.3.0",
"vuex": "^4.0.2"
Expand All @@ -37,6 +35,8 @@
"postcss": "^8.4.38",
"prettier": "^3.2.5",
"tailwindcss": "^3.4.3",
"vite": "^5.2.8"
"vite": "^5.2.8",
"vite-plugin-pwa": "^0.20.0",
"vue-pwa-asset-generator": "^1.7.3"
}
}
Binary file added public/favicon.ico
Binary file not shown.
Binary file added public/img/icons/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/img/icons/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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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/img/icons/apple-touch-icon-120x120.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/img/icons/apple-touch-icon-152x152.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/img/icons/apple-touch-icon-180x180.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/img/icons/apple-touch-icon-60x60.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/img/icons/apple-touch-icon-76x76.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/img/icons/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/img/icons/favicon-16x16.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/img/icons/favicon-32x32.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/img/icons/msapplication-icon-144x144.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/img/icons/mstile-150x150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
92 changes: 91 additions & 1 deletion vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,101 @@ import { fileURLToPath, URL } from 'node:url'

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { VitePWA } from 'vite-plugin-pwa'

// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue(),
VitePWA({
registerType: 'autoUpdate',
injectRegister: 'auto',
workbox: {
cleanupOutdatedCaches: true,
globPatterns: ['**/*.{js,css,html,ico,png,svg,json,vue,txt,woff2}']
},
manifest: {
name: 'CVRP (VFMP) GA',
short_name: 'cvrp-ga',
description: 'LMD client for presenting thw work of Genetic Algorithm used to get optimal routes at the scope of capacitated vehicle routing problem (vehicle fleet mix problem)',
theme_color: 'white',
background_color: 'white',
display: 'standalone',
icons: [
{
'src': './img/icons/android-chrome-192x192.png',
'sizes': '192x192',
'type': 'image/png'
},
{
'src': './img/icons/android-chrome-512x512.png',
'sizes': '512x512',
'type': 'image/png'
},
{
'src': './img/icons/android-chrome-maskable-192x192.png',
'sizes': '192x192',
'type': 'image/png',
'purpose': 'maskable'
},
{
'src': './img/icons/android-chrome-maskable-512x512.png',
'sizes': '512x512',
'type': 'image/png',
'purpose': 'maskable'
},
{
'src': './img/icons/apple-touch-icon-60x60.png',
'sizes': '60x60',
'type': 'image/png'
},
{
'src': './img/icons/apple-touch-icon-76x76.png',
'sizes': '76x76',
'type': 'image/png'
},
{
'src': './img/icons/apple-touch-icon-120x120.png',
'sizes': '120x120',
'type': 'image/png'
},
{
'src': './img/icons/apple-touch-icon-152x152.png',
'sizes': '152x152',
'type': 'image/png'
},
{
'src': './img/icons/apple-touch-icon-180x180.png',
'sizes': '180x180',
'type': 'image/png'
},
{
'src': './img/icons/apple-touch-icon.png',
'sizes': '180x180',
'type': 'image/png'
},
{
'src': './img/icons/favicon-16x16.png',
'sizes': '16x16',
'type': 'image/png'
},
{
'src': './img/icons/favicon-32x32.png',
'sizes': '32x32',
'type': 'image/png'
},
{
'src': './img/icons/msapplication-icon-144x144.png',
'sizes': '144x144',
'type': 'image/png'
},
{
'src': './img/icons/mstile-150x150.png',
'sizes': '150x150',
'type': 'image/png'
}
]
}
})
],
resolve: {
alias: {
Expand Down

0 comments on commit 8c2774a

Please sign in to comment.