npm next-pwa, manifest.json

This commit is contained in:
Dobromir Popov
2024-04-06 18:02:06 +03:00
parent 0717433acb
commit 16ffe5fe8f
11 changed files with 5403 additions and 260 deletions

26
manifest.json Normal file
View File

@ -0,0 +1,26 @@
{
"theme_color": "#ffffff",
"background_color": "#e36600",
"icons": [
{
"purpose": "maskable",
"sizes": "512x512",
"src": "favicon.png",
"type": "image/png"
},
{
"purpose": "any",
"sizes": "512x512",
"src": "favicon.png",
"type": "image/png"
}
],
"orientation": "any",
"display": "standalone",
"dir": "auto",
"lang": "en-US",
"name": "Специално Свидетелстване София",
"short_name": "ССС",
"start_url": "https://sofia.mwitnessing.com/dash",
"scope": "https://sofia.mwitnessing.com/cart"
}

View File

@ -1,6 +1,14 @@
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
const withPWA = require("next-pwa");
module.exports = {
module.exports = withPWA({
pwa: {
dest: "public",
// register: true,
// skipwaiting: true,
// disable: process.env.NODE_ENV === "development",
},
typescript: {
// !! WARN !!
// Dangerously allow production builds to successfully complete even if
@ -42,4 +50,4 @@ module.exports = {
return config;
},
}
});

5593
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,18 +1,19 @@
{
"name": "pwwa",
"version": "1.1.2",
"version": "1.2.0",
"private": true,
"description": "JW PW Web App",
"repository": "http://git.d-popov.com/popov/next-cart-app.git",
"bugs": {
"url": "https://git.d-popov.com/popov/next-cart-app/issues"
},
"homepage": "https://git.d-popov.com/popov/next-cart-app",
"homepage": "https://mwitnessing.com",
"scripts": {
"debug": "node server.js",
"debug-env": "dotenv -e .env.$APP_ENV -- nodemon --inspect server.js",
"nodeenv": "dotenv -e .env.$APP_ENV -- node server.js",
"prod": "npx next build && dotenv -e .env.production -- node server.js",
"generate-sw": "workbox generateSW workbox-config.js",
"build": "next build",
"buildWin": "npm run build",
"start": "next start",
@ -72,6 +73,7 @@
"next": "^14.1.0",
"next-auth": "^4.24.6",
"next-connect": "^1.0.0",
"next-pwa": "^5.6.0",
"node-excel-export": "^1.4.4",
"node-telegram-bot-api": "^0.64.0",
"nodemailer": "^6.9.9",
@ -108,6 +110,7 @@
"devDependencies": {
"cross-env": "^7.0.3",
"depcheck": "^1.4.7",
"prisma": "^5.11.0"
"prisma": "^5.11.0",
"workbox-cli": "^7.0.0"
}
}
}

21
pages/_document.js Normal file
View File

@ -0,0 +1,21 @@
import Document, { Html, Head, Main, NextScript } from "next/document";
class MyDocument extends Document {
render() {
return (
<Html>
<Head>
<link rel="manifest" href="/manifest.json" />
<link rel="apple-touch-icon" href="/favicon.png"></link>
<meta name="theme-color" content="#e36600" />
</Head>
<body>
<Main />
<NextScript />
</body>
</Html>
);
}
}
export default MyDocument;

BIN
public/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 KiB