From 04e7088b7d44be5bd955361f7c50f8c488e0ed03 Mon Sep 17 00:00:00 2001 From: cutls Date: Sat, 8 Feb 2020 00:01:11 +0900 Subject: [PATCH] test for pwa --- app/package.json | 3 ++- app/view/make/index.sample.html | 1 + app/view/make/make.js | 13 +++++++++++-- index.html | 6 ++++++ 4 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 index.html diff --git a/app/package.json b/app/package.json index 745a2e14..42a193c3 100644 --- a/app/package.json +++ b/app/package.json @@ -13,7 +13,8 @@ "build:js": "node build.js", "build": "node view/make/make.js --automatic && npx electron-builder", "build:all": "npx electron-builder --win --linux", - "build:win": "npx electron-builder --win" + "build:win": "npx electron-builder --win", + "build:pwa": "node view/make/make.js --automatic --pwa" }, "keywords": [ "mastodon", diff --git a/app/view/make/index.sample.html b/app/view/make/index.sample.html index c6b0c914..d624b3e4 100644 --- a/app/view/make/index.sample.html +++ b/app/view/make/index.sample.html @@ -24,6 +24,7 @@ + @@pwa@@ ') + } else { + source = source.replace(/@@pwa@@/g, '') + } fs.writeFileSync(basefile + 'view/' + lang + '/' + pages[i], source) } } } -main(ver, basefile) +main(ver, basefile, pwa) //if --watch, to yarn dev if (process.argv.indexOf('--watch') !== -1) { diff --git a/index.html b/index.html new file mode 100644 index 00000000..8b6612c0 --- /dev/null +++ b/index.html @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file