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