mirror of
https://github.com/kiwix/kiwix-js-pwa.git
synced 2025-09-08 03:37:12 -04:00
Make electron app a pwa
Former-commit-id: 325e9ce806172195629be457d4c7439f4574874f [formerly df3745200e3a36a2d3bd1f8eb2367ab74d452f81] Former-commit-id: da7d172ff2882b2f7cc4c12021e96813d41fdc9b
This commit is contained in:
parent
6321aca286
commit
0ac41609b5
4
main.js
4
main.js
@ -43,9 +43,9 @@ function createWindow() {
|
||||
});
|
||||
|
||||
// and load the index.html of the app.
|
||||
// mainWindow.loadURL('app://www/index.html');
|
||||
mainWindow.loadURL('https://kiwix.github.io/kiwix-js-windows');
|
||||
// DEV: If you need Service Worker more than you need document.cookie, load app like this:
|
||||
mainWindow.loadFile('www/index.html');
|
||||
// mainWindow.loadFile('www/index.html');
|
||||
|
||||
mainWindow.webContents.on('new-window', function(e, url) {
|
||||
// Make sure blob urls stay in electron perimeter
|
||||
|
@ -20,7 +20,7 @@
|
||||
},
|
||||
"asar": true,
|
||||
"files": [
|
||||
"service-worker.js",
|
||||
"pwabuilder-sw.js",
|
||||
"index.html",
|
||||
"CHANGELOG.md",
|
||||
"LICENCE",
|
||||
@ -47,7 +47,7 @@
|
||||
},
|
||||
"asar": true,
|
||||
"files": [
|
||||
"service-worker.js",
|
||||
"pwabuilder-sw.js",
|
||||
"index.html",
|
||||
"CHANGELOG.md",
|
||||
"LICENCE",
|
||||
@ -61,7 +61,7 @@
|
||||
"dist": "electron-builder",
|
||||
"package-mac": "electron-packager . kiwix-js-windows --overwrite --platform=darwin --arch=x64 --icon=assets/icons/mac/icon.icns --prune=true --out=release-builds",
|
||||
"package-win": "electron-packager . kiwix-js-windows --ignore=archives --ignore=AppPackages --ignore=BundleArtifacts --ignore=images$ --ignore=bin$ --ignore=bld$ --ignore=KiwixWebApp.* --ignore=[pP]ackage.[aSl] --ignore=node_ --ignore=[.]git[hi][ug][bn] --ignore=[.]vs$ --ignore=vscode --overwrite --platform=win32 --arch=ia32 --icon=www/img/icons/kiwix-64.ico --prune=true --out=bld/electron --version-string.CompanyName=Kiwix --version-string.FileDescription='Kiwix JS ZIM File Reader' --version-string.ProductName='Kiwix JS for Windows Electron Edition'",
|
||||
"postpackage-win": "(robocopy archives bld\\Electron\\kiwix-js-windows-win32-ia32\\archives\\ /XF wikiv*.* > null) ^& IF %ERRORLEVEL% LSS 8 SET ERRORLEVEL = 0",
|
||||
"postpackage-win": "(robocopy archives bld\\Electron\\kiwix-js-windows-win32-ia32\\archives\\ /XF wiki*med*.* > null) ^& IF %ERRORLEVEL% LSS 8 SET ERRORLEVEL = 0",
|
||||
"package-linux": "electron-packager . kiwix-js-windows --overwrite --platform=linux --arch=x64 --icon=www/img/icons/kiwix-64.png --prune=true --out=bld/electron"
|
||||
},
|
||||
"repository": "https://github.com/kiwix/kiwix-js-windows",
|
||||
@ -75,7 +75,7 @@
|
||||
"author": "Kiwix",
|
||||
"license": "CC0-1.0",
|
||||
"devDependencies": {
|
||||
"electron": "^5.0.9",
|
||||
"electron": "^8.0.1",
|
||||
"electron-builder": "^21.2.0",
|
||||
"electron-packager": "^14.0.4"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user