#228 - last attempt to add manifest, npm update

This commit is contained in:
viliusle 2021-10-23 23:14:09 +03:00
parent ae900ac17e
commit 47dbbea3bc
6 changed files with 8075 additions and 1899 deletions

View File

@ -8,7 +8,7 @@
<meta name="keywords" content="photo, image, picture, transparent, layers, free, edit, html5, canvas, javascript, online, photoshop, gimp, effects, sharpen, blur, magic eraser tool, clone tool, rotate, resize, photoshop online, online tools, tilt shift, sprites, keypoints" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=0" />
<link rel="icon" sizes="192x192" href="images/favicon.png">
<!-- <link rel="manifest" href="manifest.json"> -->
<link rel="manifest" href="dist/manifest.json">
<!-- Google -->
<meta itemprop="name" content="miniPaint" />
<meta itemprop="description" content="miniPaint is free online image editor using HTML5. Edit, adjust your images, add effects online in your browser, without installing anything..." />

View File

@ -1,41 +0,0 @@
{
"name": "miniPaint",
"short_name": "miniPaint",
"start_url": "/",
"display": "standalone",
"orientation": "landscape",
"background_color": "#666d6f",
"description": "miniPaint is free online image editor using HTML5.",
"icons": [
{
"src": "images/manifest/48x48.png",
"sizes": "48x48",
"type": "image/png"
},
{
"src": "images/manifest/72x72.png",
"sizes": "72x72",
"type": "image/png"
},
{
"src": "images/manifest/96x96.png",
"sizes": "96x96",
"type": "image/png"
},
{
"src": "images/manifest/144x144.png",
"sizes": "144x144",
"type": "image/png"
},
{
"src": "images/manifest/168x168.png",
"sizes": "168x168",
"type": "image/png"
},
{
"src": "images/manifest/192x192.png",
"sizes": "192x192",
"type": "image/png"
}
]
}

9873
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -31,7 +31,8 @@
"style-loader": "^2.0.0",
"webpack": "^5.38.1",
"webpack-cli": "^4.7.2",
"webpack-dev-server": "^3.11.2"
"webpack-dev-server": "^4.3.1",
"webpack-pwa-manifest": "^4.3.0"
},
"dependencies": {
"@babel/runtime": "^7.14.5",

View File

@ -152,13 +152,13 @@ class Base_gui_class {
}
init_service_worker() {
/*if ('serviceWorker' in navigator) {
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('./service-worker.js').then(function(reg) {
//Successfully registered service worker
}).catch(function(err) {
console.warn('Error registering service worker', err);
});
}*/
}
}
set_events() {

View File

@ -1,5 +1,6 @@
var webpack = require('webpack');
var path = require('path');
var WebpackPwaManifest = require('webpack-pwa-manifest');
module.exports = {
entry: [
@ -44,11 +45,57 @@ module.exports = {
new webpack.DefinePlugin({
VERSION: JSON.stringify(require("./package.json").version)
}),
new WebpackPwaManifest({
name: "miniPaint",
short_name: "miniPaint",
description: "miniPaint is free online image editor using HTML5.",
start_url: "/",
display: "standalone",
orientation: "landscape",
publicPath: './',
background_color: "#666d6f",
filename: "manifest.json",
includeDirectory: true,
icons: [
{
src: path.resolve("images/manifest/48x48.png"),
sizes: "48x48",
type: "image/png"
},
{
src: path.resolve("images/manifest/72x72.png"),
sizes: "72x72",
type: "image/png"
},
{
src: path.resolve("images/manifest/96x96.png"),
sizes: "96x96",
type: "image/png"
},
{
src: path.resolve("images/manifest/144x144.png"),
sizes: "144x144",
type: "image/png"
},
{
src: path.resolve("images/manifest/168x168.png"),
size: "168x168",
type: "image/png"
},
{
src: path.resolve("images/manifest/192x192.png"),
sizes: "192x192",
type: "image/png"
}
]
}),
],
devtool: "cheap-module-source-map",
devServer: {
// host: '0.0.0.0',
contentBase: "./",
compress: true
//contentBase: "./",
static: {
directory: path.resolve(__dirname, "./"),
},
}
};